Image preview not loading using FileUpload

The image gets saved when I create a new brand, but when I navigate to 'Lists,' the image is not displayed. This is my APP_URL: APP_URL=http://127.0.0.1:8000. I have already run the command php artisan storage:link. Relevant code in my BrandResource :
Tables\Columns\ImageColumn::make('logo')
->label('Logo')
Tables\Columns\ImageColumn::make('logo')
->label('Logo')
No description
Solution:
App url in the env should be the same as the url in the browser. So http://cc.test
Jump to solution
8 Replies
Lara Zeus
Lara Zeus2mo ago
add APP_URL=http://127.0.0.1:8000//admin maybe it helps? its better to have a virtual host per app instead of sub folder
cyan.vm
cyan.vmOP2mo ago
Thanks for the response ! By "virtual host," do you mean a URL like the one shown in the URL bar (http://cc.test/admin/brands)? I used Laragon to set up the virtual host. While using the virtual host, I tried with APP_URL=http://127.0.0.1:8000, then I reloaded the browser with your suggestion: APP_URL=http://127.0.0.1:8000/admin. But with both configurations, I'm still unable to see the images like shown in the first image i attached.I also attached an image showing where the images are being saved.
No description
No description
Solution
awcodes
awcodes2mo ago
App url in the env should be the same as the url in the browser. So http://cc.test
awcodes
awcodes2mo ago
You’ll probably also need to redo the images after making that change. Looks like it might be storing the path wrong too.
cyan.vm
cyan.vmOP2mo ago
OMG, it worked! I really appreciate the help. Also, is it possible to achieve a listing like in the image, displaying only the image and the name of the brand?
No description
cyan.vm
cyan.vmOP2mo ago
Thank you again!
awcodes
awcodes2mo ago
No worries.
Want results from more Discord servers?
Add your server