Created
August 26, 2018 20:28
-
-
Save wotta/ed529deee407486896978c73982b6879 to your computer and use it in GitHub Desktop.
Laravel nova snippets.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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