Skip to content

Instantly share code, notes, and snippets.

@wotta
Created August 26, 2018 20:28
Show Gist options
  • Save wotta/ed529deee407486896978c73982b6879 to your computer and use it in GitHub Desktop.
Save wotta/ed529deee407486896978c73982b6879 to your computer and use it in GitHub Desktop.
Laravel nova snippets.
<?php
File::make('File')->disk('public')->hideFromIndex()->rules('required')->storeAs(function () {
$file = request()->file('file');
return 'fonts/'.$file->getClientOriginalName();
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment