Difference between using Livewire vs Resource for Filament Forms?
I have Laravel 11 and just installed Filament to use for my end-user facing website (not admin). I see examples that use both Livewire Component as well as "Resource". What is the difference? Pros/Cons?
6 Replies
resource is in the panel
panel meaning? Admin Panel?
yes
Resources are used to build CRUD interfaces for your Eloquent models, in the Admin Panel
https://filamentphp.com/use-cases/admin-panel
You can also use Filament components in Livewire features such as the Table Builder, Form Builder, Infolist... However, you’ll need to develop the actions yourself.
Resources are just classes that hold configuration for the admin panel including form and table. If you are working with the Panel and need CRUD functionality go with a Resource.
If you just need a single form: Use a Page/Livewire component and add a form
Ahh, thanks for the clarification