mercredi 22 février 2017

Saving select box value to database laravel

I'm doing my first site in laravel 5 (recently updated from 4.2, and still getting used to it), and I have a view with a select box and I can't get the input data.

The view:

{!!Form::select('estado', array(
'obra' => 'Obra', 
'licitacion' => 'Licitación', 
'oficial' => 'oficial'), null, ['id' =>'estado' class' => 'form-control']) !!}

In the Controller I do

data = Input::all();

But, if I do dd to the data array the field doesn't appear in it (every field is there but the one in the select box)

In my model I have it in the rules as required. My question is, what am I doing wrong, that I can't save the value, Thanks in advance



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kZNdfq
via IFTTT

Aucun commentaire:

Enregistrer un commentaire