laraveldev04523
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
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