页面 · Laravilt
Reactive Fields
Live updates, dependent options and conditional visibility with $get and $set.
Reactive fields send their value to the server when it changes. The server can then update other fields, reload options, or show and hide fields.
Live updates
php
live(debounce: 500) waits for the user to stop typing, and lazy() updates on blur.
Dependent options
php
Conditional visibility
php
Setting other fields
php
Injected closure parameters
Closures receive parameters by type or by name:
| Parameter | Value |
|---|---|
Get $get | Read another field's value |
Set $set | Update another field's value |
$state | The current field's value |
$record | The current Eloquent record (when editing) |
$operation | The current operation, e.g. create or edit |
$data | All form data |