select
Creates select input.
FormItem::select('category_id', 'Category')
Providing Data
With array:
->list(['First', 'Second', 'Third])
With enum (use array values as keys):
->enum(['First', 'Second', 'Third])
With class:
->list(\Foo\MyModel::class)
MyModel
must implement public static function getList()
and return array.
Nullable Field
You can mark select to be nullable:
->nullable()