Here is the code:
<a download="MyPdf" href="{{ storage('app/public/file.pdf') }}" title="MyPdf">Download</a>
The file.pdf are in the folder storage/app/public
Here is the code:
<a download="MyPdf" href="{{ storage('app/public/file.pdf') }}" title="MyPdf">Download</a>
The file.pdf are in the folder storage/app/public
First you need to create a symbolic link
php artisan storage:link
That will create a symbolic link to /storage/app/public
After you need use Storage::url()
;
Example:
<a download="MyPdf" href="{{ Storage::url('file.pdf') }}" title="MyPdf">Download</a>
With this you will download what is in the /storage/app/public/file.pdf
folder
add url like
Route::get('get/file', function(){
return Storage::download('path to file');
})
now hit the url and you will download the file