You should read this :) https://laravel.com/docs/5.6/filesystem#the-local-driver
May 30, 2018
7
Level 1
Best way to store files in Laravel
Hello everyone (:
I'm having a project with laravel, and I need to upload some [sensitive files] using this application.
So I want to know what is the best way to store files in a private folder (not the public).
Level 67
According to the docs, where you are using $storagePath, it should be the alternate name of the file, not an actual path. Like lets say the actual name of the file in storage is 5b0ea5ec524b7.zip, but you want the user to download it as '2018-05-30-report.zip`
return response()->download($pathToFile, $name, $headers);
1 like
Please or to participate in this conversation.