Select

The SelectComponent
allows users to choose from a list of options. This component will be displayed as a dropdown menu in the admin panel. You can customize the options and set a default value. Here's how to use the SelectComponent
in your Blade view:
{{ $feature->select('value')->options(['First', 'Second', 'Third']) }}
options(array $options)
This method sets the list of options that users can choose from.
$feature->select('value')->options(['First', 'Second', 'Third']);
default(string $default)
This method sets the default value for the dropdown menu.
$feature->select('value')->options(['First', 'Second', 'Third'])->default('Second');
required()
This method makes it mandatory for users to select an option.
$feature->select('value')->options(['First', 'Second', 'Third'])->required();
label(string $label)
This method sets the title for the dropdown menu in the admin panel.
$feature->select('value')->options(['First', 'Second', 'Third'])->label('Select an option');
{{ $feature->select('value')->options(['First', 'Second', 'Third'])->label('Choose a value')->default('Second') }}