F
Filament•4mo ago
KonaĹ›

filament v3 assets not loading on production

I have project locally, everything working. I move files on web hosting, Nginx, Ubuntu 24.04, Claudflare, Filament v3, Laravel 11 When i login into the panel i have asset error that alpine...js use http and require is https or something like that. Anybody have nginx config for that? Or other solution Thanks 🙂
5 Replies
Desmond Njuguna
Desmond Njuguna•4mo ago
Are you building the assets on prod? and changed the APP_ENV to prod?
Dennis Koch
Dennis Koch•4mo ago
i have asset error that alpine...js use http and require is https or something like that. Anybody have nginx config for that?
Doens't sound like a nginx issue. You just need to set the APP_URL or need this in your service provider:
if($this->app->environment('production')) {
URL::forceScheme('https');
}
if($this->app->environment('production')) {
URL::forceScheme('https');
}
christmex
christmex•4mo ago
Add
ASSET_URL=public
ASSET_URL=public
in your .env file and run
php artisan config:cache
php artisan config:cache
KonaĹ›
KonaśOP•4mo ago
No description
KonaĹ›
KonaśOP•4mo ago
Thank you, its start to working after append use Illuminate\Support\Facades\URL; if($this->app->environment('production')) { URL::forceScheme('https'); } into AppServiceProvider in boot method
Want results from more Discord servers?
Add your server