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 but I receive an String string(1) "0"

A lot of thanks !



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

Aucun commentaire:

Enregistrer un commentaire