Checkbox
The checkbox captures a single boolean. The label sits next to the box and describes what checking it
means. Create one with Checkbox::make().
Checkbox::make('newsletter', 'Subscribe to the newsletter')- autoFocus:false
- columnWidth:"md"
- conditions:null
- dependsOnAny:false
- dependsOnKeys:null
- disabled:false
- editablePrefill:false
- helperText:null
- hidden:false
- label:"Subscribe to the newsletter"
- name:"newsletter"
- prefillRefreshOn:null
- prefillResetOn:null
- readOnly:false
- required:false
- tabIndex:null
- tooltip:null
- value:null
Requiring consent
Section titled “Requiring consent”A checkbox is often used for a terms-of-service agreement that must be ticked. Use Laravel’s
accepted rule rather than required, which only checks that the field is present:
Checkbox::make('terms', 'I accept the terms and conditions') ->rules(['accepted']);Common options
Section titled “Common options”Checkbox shares label, default value, required, disabled, read-only, and visibility options with
every field — see Fields. For validation and conditional behavior, see
Validation and Conditional fields.