Assets Not Found on Server
Hey everyone I hope you are all doing well. today I counter this issue where my app's base URL is https://demo.wellbuiltdigital.com/d/hp-filament/public/ but Filament and Livewire try to fetch the assets from https://demo.wellbuiltdigital.com/ now how can I fix this issue. I would really appreciate your assistance in this matter.
9 Replies
Solution
Try to set
ASSET_URL=https://xx
in the .env file@Leandro Ferreira thank you for your assistance it's solved the filament's assets issue but still livewire js is not found
public/
this is a red flag.
The public
folder should never be part of the URL.
That usually means people can access your .env
via https://demo.wellbuiltdigital.com/d/hp-filament/.env
yes but this is just for the demo server not for live server
Then use the same setup as for your live server
Your web server isn't correctly configured to use that folder as the document root so that will definetly cause more issues
sir I'm not setup the live server yet this is my just filament project I just use a shared hosting to trying to figure out how everything works on the live
Yeah I understand. But shared hosting will always cause issues with Laravel.
We can't really provide help with that, sorry.
I'm with Dennis on skipping '/public' in the app URL, but if you're really set on using it, check the livewire docs to configure it manually.
https://livewire.laravel.com/docs/installation#customizing-the-asset-url
Laravel
Installation | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Thank you both of you for your valuable time