Skip to main content Skip to navigation

Components: HasOptions

How to use

Components that use this trait allow you pick from a selection of options.

Available methods

options(iterable $options): static

Set the options.

Component::make()
    ->options([
        'todo' => 'To do',
        'ongoing' => 'In progress',
        'pending' => 'Needs verification',
        'done' => 'Completed',
    ])