Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rudexpunx's avatar

Laravel can't access files - 404

I am saving files to storage/app/public successfully, I also created symlink using artisan command, so I should be able to access files using /storage/ however, for some reason, I get 404 (Sorry, the page you are looking for could not be found.). Even permissions look good.

There is no wildcard route like /{}, so I have no idea what is going on.

I am using Storage::url('file.jpg') in my app, but I can't access the file even manually, looking it up on http://local.app/storage/file.jpg. Symlink works good, navigating to the symlinked directory shows files as expected.

Browser cache cleared App cache cleared Configuration cache cleared

Yet nothing works.

http://local.app/js/app.js works fine, for example.

ls -la: drwxr-xr-x 3 xx staff 102 Sep 10 23:09 js lrwxr-xr-x 1 xx staff 43 Oct 3 14:45 storage -> Sites/local.app/storage/app/public

Must be something really stupid I am missing here...

0 likes
1 reply
rudexpunx's avatar
rudexpunx
OP
Best Answer
Level 4

After two hours of nightmare - finally solved. You have to run php artisan storage:link in your Homestead machine, not locally. Phew

1 like

Please or to participate in this conversation.