I have store the file in storage/app/files folder by $path=$request->file->store('files')
and save the path "files/LKaOlKhE5uITzAbRj5PkkNunWldmUTm3tOWPfLxO.doc" it in a table's column name file
.
I have also linked storage folder to public through php artisan storage:link
.
In my view blade file, I put this
<a href="@if(count($personal_information)) {{asset('storage/'.$personal_information->file)}} @endif" download>Download File</a>
and the link for download file is http://localhost:8000/storage/files/LKaOlKhE5uITzAbRj5PkkNunWldmUTm3tOWPfLxO.doc
But I get the error
NotFoundHttpException in RouteCollection.php line 161
If I add /app
after the /storage
it gives the same error. How can I download file from my storage/app/files
folder?