Skip to content

Choice

Choice presents a small set of options inline, so every option is visible at once. Use it instead of a Select when there are only a handful of choices. Create one with Choice::make() and pass the options with ->options().

Choice::make('plan', 'Plan')
->options([
Choice::option('Free', 'free'),
Choice::option('Pro', 'pro'),
Choice::option('Enterprise', 'enterprise'),
])

->enum() builds the options from a backed enum. Pass the enum class for every case, or an array of cases for a subset. Labels come from the enum’s HasLabel contract when it implements one, otherwise the case name is humanized.

Choice::make('plan', 'Plan')->enum(Plan::class);

Choice 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.