Created
February 2, 2018 18:51
-
-
Save mitrallex/31a0378fa5616670b7f7fdca899195ca to your computer and use it in GitHub Desktop.
laravel-file-hosting
This file contains hidden or 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
| if (Storage::putFileAs('/public/' . $this->getUserDir() . '/' . $type . '/', $file, $request['name'] . '.' . $ext)) { | |
| return $model::create([ | |
| 'name' => $request['name'], | |
| 'type' => $type, | |
| 'extension' => $ext, | |
| 'user_id' => Auth::id() | |
| ]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment