I just tried the symbolic link in laravel, and it is working fine when I’m using valet.
But when I use php artisan serve
command, it returns 404 error
. I’ve read a lot regarding this topic but none of them works. Maybe you have an idea?
404 when using: php artisan serve
asset('storage/images/me.jpeg')
url('/') . '/' . 'storage/images/me.jpg'
'/storage/images/me.jpg'
Advertisement
Answer
Every time you change the server (so for example form local to production, or you download a repo from somewhere), you need to recreate the symbolic link that links storage
to public
(check here for more)