Radio

//associative array
$options = ['Wifi' => 'wf', 'Bluetooth' => 'bl', 'Ethernet' => 'eth'];
Radio::make('Radio')
->wire('defer') //wait with validation until next request.
->options($options)
->rules([Rule::in(array_values($options))])
->default('wf');//Radio where labels = key
$options = ['Wifi', 'Bluetooth', 'Ethernet'];
Radio::make('Radio')
->options($options)
->rules([Rule::in($options)])
->default('Wifi');->options($options)
Last updated
Was this helpful?