I have big problem to enable Auth users download stored files in laravale storage. Users has in table users
field id_message
which is unique name of folder where user has file to download.
What has to be made in AuthController
which controll dashboard.blade
to access user download file ? problem is how add from table variable id_message
to file path
File is stored /app/files/{id_message}/*.zip
return response()->download(store_path('app/files/'.(Auth()->user()->id_message).'/*.zip'));
And at the end, what will be in blade
<td><a href="{{ }}">Download</a></td>
Can't understand why is this problem so hard to solve it for me.
you can simply use an
<a>
tag with file url as thehref
of the tag.or you can do it with a controller method.
route
controller
and in view