I'm working on laravel 5.5
I have these lists:
{!! Form::mySelect('id_uso',
'Uso',
[0 => 'Escoge una opción'] + App\Usos::pluck('nombre', 'id')->toArray(),
null,
['required','id' => 'listaUsos', 'class'=>'chosen']) !!}
{!! Form::mySelect('id_padre',
'Servidor padre: Escojer unicamente los que esten marcador con - 1', [0 => 'Escoge una opción'] +
App\Servidores::select(DB::raw("CONCAT(hostname, ' - ', id_uso) AS hostname_version"), "id")-> pluck('hostname_version', 'id')->toArray(),
null,
['required','class'=>'requerido-con-virtual', 'style' => 'width: 100%;']) !!}
The problem is that when saving, take this value [0 = > 'Choose an option'], and I need you to be required to choose a value from the list, instead of taking 'Choose an option', I put the required, but it does not work.
Could someone help me?
Thanks for reading, happy day.