vendredi 27 mai 2016

How to add radio button

Good morning everyone !

I have a problem with radio buttons in Laravel5 , now I receive an array of radio buttons called location1, location2, location3 correctly.

$inputLoc= $request->input('location1');
var_dump($inputLoc);

In this case I can show 0 or 1 depending to the selected value, but now I need to use this location here.

for ($i=0; $i <$numbers; $i++) { 
     $extra= new Extra();
     $extra->description=$informacion[$i];
     $extra->pi_id=$pi[$i];
     $extra->location=0;
     $extra->save();
}

How can I send the array of location into this for ? Could anyone help to me.

In the database I have a number 0 or 1

A lot of thanks !



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire