samedi 27 février 2016

how to pass checkbox value from view to controller in laravel while clicking checkbox

Here is my code.. View

    <label>
<input class="i-check" name="amenity[]" type="checkbox" value="{{$amn->ht_amenity_id}}" />{{$amn->ht_amenity_name}}
     </label>

Controller

$purp = $_POST['amenity'];
    print_r($purp);

Here (In controller), I'm just trying to print the value

Please Some one help me.




Aucun commentaire:

Enregistrer un commentaire