In this answer, we have shared how to upload files in laravel. We have to call Facades in our controller file with this:
1 | use Illuminate\Support\Facades\Storage; |
Example:
1 2 3 4 5 | if($request->hasFile(file_name')) { $file = Storage::putFile('YOUR FOLDER PATH', $request->file('file_name')); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.