Adding a form to a Livewire component
Setting a form modelGiving the $form access to a model is useful for a few reasons:It allows fields within that form to load information from that model. For example, select fields can load their options from t...
About This Course
Setting a form model
Giving the $form access to a model is useful for a few reasons:
- It allows fields within that form to load information from that model. For example, select fields can load their options from the database automatically.
- The form can load and save the model's relationship data automatically. For example, you have an Edit Post form, with a Repeater which manages comments associated with that post. Filament will automatically load the comments for that post when you call $this->form->fill([...]), and save them back to the relationship when you call $this->form->getState().
- Validation rules like exists() and unique() can automatically retrieve the database table name from the model.
It is advised to always pass the model to the form when there is one. As explained, it unlocks many new powers of the Filament Form Builder.
To pass the model to the form, use the $form->model() method:
Course Curriculum
-
Course Content
-
file_example_MP4_480_1_5MG
Vos informations de profil dans les services 1SIMPLE1Vous trouverez ici vos données personnelles et les possibilités de...
-
file_example_MP4_480_1_5MG
Vos informations de profil dans les services 1SIMPLE1Vous trouverez ici vos données personnelles et les possibilités de...
-
file_example_MP4_480_1_5MG
Vos informations de profil dans les services 1SIMPLE1Vous trouverez ici vos données personnelles et les possibilités de...
-
file_example_MP4_480_1_5MG
Vos informations de profil dans les services 1SIMPLE1Vous trouverez ici vos données personnelles et les possibilités de...
-
file_example_MP4_480_1_5MG
Vos informations de profil dans les services 1SIMPLE1Vous trouverez ici vos données personnelles et les possibilités de...
-
file_example_MP4_480_1_5MG
Setting a form modelGiving the $form access to a model is useful for a few reasons:It allows fields within that form to...
-
Instructor

Reviews (0)
You must login to leave a review
file_example_MP4_480_1_5MG
none
file_example_MP4_480_1_5MG
none
file_example_MP4_480_1_5MG
none
file_example_MP4_480_1_5MG
none
file_example_MP4_480_1_5MG
none
file_example_MP4_480_1_5MG
none