Declaration
::make vs ::blade
::make vs ::bladeIn a Standard form, Modal or Without button forms, you use the make() method
FooField::make(string $label, null|string $key = null)In Headless or Fields only forms you use the blade() method
FooField::blade(
string $label,
null|string $key = null,
string $wireId = '',
string $name = '',
string $id = ''
)Both ::make and ::blade params
$label
$labelRequired The label to use for the form field, e.g. First Name.
$key (wire:model)
$key (wire:model)Optional. The key to use for the form field. If null, it will use a snake cased $label. This parameter corresponds to the $model attribute and sets the wire:model attribute on the field.
Basic input example:
Select field example
::blade only params
$id
Optional. The $id property overrides $wireId. For Headless or Fields only forms. Set the input html id attribute else, it will be auto-generated from the field $key.
$wireId
Optional. The $id property overrides $wireId. For Headless or Fields only forms. Pass the Livewire $_instance->id to get a component unique input html id else, it will be auto-generated from the field $key.
$name
Optional. For Headless or Fields only forms. Set the input html name attribute else, it will be auto-generated from the field $label.
Last updated
Was this helpful?