laravel download file from public folder 1

laravel download file from public folder

Storage::get('\public\FileNameHere')

Here is what the above code is Doing:
1. It’s creating a new instance of the FileStorage class.
2. It’s calling the new() method on the FileStorage class.
3. It’s passing the FileStorage class the name of the file it should use to store the data.
4. It’s calling the save() method on the FileStorage class.
5. It’s passing the FileStorage class the data it should save.
6. It’s calling the get() method on the FileStorage class.
7. It’s passing the FileStorage class the name of the file it should use to retrieve the data.

Similar Posts