dimanche 18 septembre 2016

How to get checkbox selected values from Laravel form

I m having a problem with my Laravel from. I am using collapsible checkbox field for getting user inputs. I am using javascript for loading this collapsible check boxes.
This is my view.

<div class="form-group">
   <div class="form-group col-md-offset-6" >
      <input  type="button"  data-toggle="collapse" data-target="#demo"  value="Student List" >
           <div  id="demo" class="collapse" > 
               <div class="panel panel-default"  >
                   <div class="panel-body" name="specific" id="demos" style="max-height: 100px;overflow-y: scroll;" >
                       <input type="checkbox" name="specific[]" value=" "> <br>
                   </div>    
               </div>
           </div>                       
        </div>
 </div>

Here I need to get specific[] input fields.

In my controller, When I use

$spec = Input::get('specific');
   return $spec;

This returns nothing. What is the wrong here?
Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire