Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!
Want to access all of our courses? (29 h 14 min)
You also get:
Already a member? Login here
Hi, I am trying to retrive a image using *$project->getFirstMediaUrl('projects') *
And it generate this: img src="http://localhost/storage/6/image-1.jpg" alt="Project image"
I have linked the storage folder with the artisan command. php artisan storage:link
But I am getting 404 any way. Image is uploaded successfully and in the rigth folder. I am using Sail.
I dont know what could be the problem.
Maybe you should have something like localhost:8000 and not localhost? Maybe in your .env file in APP_URL you should define that with the port?
.env
APP_URL
To be honest, I don't use Sail so not sure what could be caused by that.
I solved it! I did storage:link in the VScode terminal and not in the dock container.
Thank you for you help any way :) !
Call to a member function store() on null (
Tell us what you like or what we can improve
Feel free to share anything you like or dislike about this page or the platform in general.
Your feedback has been received. We truly appreciate you taking the time to help us improve.
Hi, I am trying to retrive a image using *$project->getFirstMediaUrl('projects') *
And it generate this: img src="http://localhost/storage/6/image-1.jpg" alt="Project image"
I have linked the storage folder with the artisan command. php artisan storage:link
But I am getting 404 any way. Image is uploaded successfully and in the rigth folder. I am using Sail.
I dont know what could be the problem.
Maybe you should have something like localhost:8000 and not localhost? Maybe in your
.envfile inAPP_URLyou should define that with the port?To be honest, I don't use Sail so not sure what could be caused by that.
I solved it! I did storage:link in the VScode terminal and not in the dock container.
Thank you for you help any way :) !