I’ve created a symlink using the command:
php artisan storage:link
Then I’ve created a file in storage/app/public
. Following the documentation, I could get the link to this file with:
asset('storage/file.txt')
Which returns in the html code:
http://127.0.0.1:8000/storage/psps.txt
But I am getting 404 error. Any help?
Advertisement
Answer
Go to your project’s public
folder, and delete the storage
folder, if it exists.
Then run this command line:
php artisan storage:link