Skip to main content Skip to navigation

Components: Select

How to use

The select field allows the user to choose from one of the pre-defined options.

Select::make('Timezone', 'timezone')
    ->placeholder('Select a timezone')
    ->rules(['required'])
    ->options([
        'CST' => 'CST',
        'GMT+4' => 'GMT+4',
        'GMT' => 'GMT',
        'GMT+10' => 'GMT+10',
        'GMT-5' => 'GMT-5',
        'CET' => 'CET',
    ])

Inherited methods

The Select field extends the base field and inherits all of its methods.

It also inherits the methods from the following traits: