Veran I have a registration form to my table Inmueble
, and one of the fields is its location, the ubicacion
is also a table in my database, the fields in the table ubicacion
are id
and nombre
, I need that the select appears the nombre
, and the value that I sent is the id
, but I do not know how to do it in laravel collective.
Currently my code in the controller is as follows:
$ubicaciones= Ubicacion::pluck('nombre', 'id');
I am receiving it at the hearing and I am showing it this way
{!! Form:: select('ubicacion', $ubicaciones, null, ['class' => 'select ph9 sm10 md10 lg10', 'placeholder' => 'Ubicación']) !!}
But at this moment when I register all the information in the form and give the registration button, laravel gives me the registration error saying that the location field is null, so I do not know what to do.