@props([ 'name', 'label' => null, 'options' => [], // [value => label] 'value' => null, 'placeholder' => null, // adds an empty first option 'required' => false, 'help' => null, 'id' => null, ]) @php $id ??= 'f-'.str_replace('.', '-', $name); $htmlName = preg_replace('/\.([^.]+)/', '[$1]', $name); $current = (string) old($name, $value instanceof \BackedEnum ? $value->value : $value); @endphp