Level 1
Hello, did you run 'php artisan storage:link' ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello! I don't know what i'm doing wrong, but i cannot see my images on storage folder and even the download file.
This are on the re:
storage/public/thumbnails <--- for img
storage/public/download <--- for pdf file
I've run the php artisan storage:link to generete the symlink.
This is my filesystem.php file links
public_path('storage') => storage_path('app/public'),
public_path('download') => storage_path('app/public/storage'),
this is how i store the image on my controller
public function store()
{
Post::create(array_merge($this->validatePost(), [
'user_id' => request()->user()->id,
'thumbnail' => request()->file('thumbnail')->store('thumbnails'),
]));
return redirect('/')->with('success', 'Nuovo strumento aggiunto!');
}
this is the route for the download file
Route::get('download/{filename}', function ($filename) {
$file = storage_path('/public/storage/download/'. $filename); // or wherever you have stored your PDF files
return response()->download($file);
});
And this is how i'm trying to showing this on my view
<img class="w-10 h-10 rounded-full" src="{{ asset('storage/' . $post->thumbnail ) }}" alt="">
<x-dropdown-item href="{{ asset('download/' . 'download.pdf') }}">
Download
</x-dropdown-item>
On the local app this works well, but on web image does'nt show and the download doesn't work. What i'm missing?
Please or to participate in this conversation.