Field methods

Field methods are described on each field type and on pages in the Field section. Some methods apply to all field types. Also see Validation, Styling ...

Shared field methods, available to all field types

->default($default)

  • Sets the default value to use for the field if if no value exists on the model.

  • Used by the reset button if no value exists on the model.

 Input::make('City')->required()->default('Stockholm'),

->wire(string $on = 'wire:model')

Override the default wire:model attribute set in config

Input::make('Search')->wire('wire:model.debounce.750ms')
Input::make('Search')->wire('defer')
Input::make('Search')->wire('lazy')

->deferEntangle(bool $state = true)

Same as $field->wire('defer'), overrides config. Defer updating field value until next request.

Input::make('Search')->deferEntangle()
Input::make('Search')->deferEntangle(false)

->rules(string|array $rules)

See Validation page

->required()

same as $field->rules('required')

->disabled()

Last updated