laraveldev04523
laraveldev04523
FFilament
Created by Darpan on 4/13/2023 in #❓┊help
Livewire.js 404 when app is hosted in sub directory
Not sure exactly what your configuration is, however I am running Filament v3.2.35, which upgraded Livewire to v3.4.6 from v3.3.5 and in doing so, I had a similar issue where livewire/livewire.js did not load when APP_DEBUG=false, which is what you would set it to in a production environment naturally. I found the issue to be in the https://github.com/livewire/livewire/blob/7e7d638183b34fb61621455891869f5abfd55a82/src/Mechanisms/FrontendAssets/FrontendAssets.php file that was recently updated. In my Filament service provider, I updated my configuration for Livewire in the boot method: (this is because my Filament app runs under an alias defined in Apache.) Livewire::setScriptRoute(function ($handle) { return config('app.debug') ? Route::get('/alias-goes-here/livewire/livewire.js', $handle) : Route::get('/alias-goes-here/livewire/livewire.min.js', $handle); }); So, this matches the change to Livewire and now my app works just as it did before! Hope this helps!
11 replies
FFilament
Created by laraveldev04523 on 10/25/2023 in #❓┊help
Tenancy and BadgeCount - seems to cause an N+1 problem of sorts
That's a good idea. I can work on that and post a link when I have it ready.
20 replies
FFilament
Created by laraveldev04523 on 10/25/2023 in #❓┊help
Tenancy and BadgeCount - seems to cause an N+1 problem of sorts
When I remove tenancy from the app, then the query runs twice as the query is in the code twice, which I completely get. It seems that for every tenant, the query runs twice. So, if I have 10 tenants, then the query runs 2x per tenant for a total of 20 queries.
20 replies