I am using Laravel Filament v3 and encountered an issue when generating a resource. I generated the resource using the following command:
php artisan make:filament-resource Anggota --generate
The resource generation completed successfully, but I am experiencing strange behavior in the table view of the generated resource. Specifically:
- When I perform a search, apply a filter, change the number of items displayed, or navigate to another page in the table, a black screen modal immediately appears.
- To view the updated data (e.g., navigating to page 2), I have to manually reload the page. After reloading, the table correctly shows the intended data (e.g., page 2).
I didn’t modify anything from the default generated resource
Environment Details:
-
Laravel version: 10
-
Filament version: v3
-
PHP version: 8.2
-
Browser: Chrome
Here is what I have tried so far:
- Ensuring that JavaScript and CSS assets are up to date.
- Clearing cache using php artisan cache:clear and php artisan view:clear.
- Rechecking the generated code, but I didn’t modify anything from the default generated resource.
2
Answers
php artisan filament:publish --assets
then clear cache.composer show livewire/livewire
, and add it if not installedcomposer require livewire/livewire
.php artisan livewire:publish
.@livewireScripts
and@livewireStyles
directives are included in your layout file.Alpine is not defined
. If found, includeAlpine.js
in your layout<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>
I found the same issue in others github, this works on me
https://github.com/filamentphp/filament/discussions/15091