Why when I deploy Filament on the server the data dropdown is empty?
So I have a select Head Partner that takes user data whose is_head is 1 but why is the dropdwon data empty. even though I make sure the user data whose is_head is 1 exists
this is the code
So I have a select Head Partner that takes user data whose is_head is 1 but why is the dropdwon data empty. even though I make sure the user data whose is_head is 1 exists
this is the code
Here I try to log the head user data and the data is there and is_head 1 this is the laravel.log
[2024-10-21 03:34:48] local.INFO: Head User Found: {"id":18,"name":"Hyundai Jakarta","is_head":1}
[2024-10-21 03:34:48] local.INFO: Head User Found: {"id":20,"name":"Honda Jakarta","is_head":1}
Does anyone know why the data doesn't appear in the head partner dropdown?
note: in local it works fine with the same code
Solution:Jump to solution
I added code like this in AppServiceProviders.php
```
if (config('app.env') !== 'local') { // pastikan hanya di production/staging
URL::forceScheme('https');...
10 Replies
Please read the #✅┊rules on how to format code.
Looks like the select isn't properly initialiazed. Do you have any JS errors in the console?
oh sorry I fixed it
yes in the chrome browser console there is an error like this. Why is there an error like this?
Is there something that needs to be fixed on the server?
What do those files return? Is there an error? Different content than the actual JS?
Do those assets exist?
I clicked this file to generate code like this
This code is automatically generated when installing filament?
because I don't think I made that code
This code is automatically generated when installing filament?Yes. Hm, looks good to me
so why does it get an error here?
do you have a solution for this
Any errors in the network tab?
yes there is an error like this
Mixed Content means you are loading assets from HTTP when using HTTPS. Either your
APP_URL
is wrong or you need URL::forceScheme('https');
in your service providerSolution
I added code like this in AppServiceProviders.php
and it works thank you very much