jeudi 28 novembre 2019

Checkbox uncheck - Laravel

I have to add checkbox to my datatable in Laravel but when I want to uncheck and remove selected item I can't do it.

My postings controller:

 return Datatables\DataTables::of($postings)
             ->addColumn('checkbox', function ($posting) {
                 return "<a href='#!' onclick='addToFavorites(" . $posting->id . ")'><i class=\"posting-id \"></i></button>
                          <input type='checkbox' class='posting-id' value='checked" . $posting-id . "'>";
 // onclick=\"removeFromFavorites(" + value['id'] + ")



Aucun commentaire:

Enregistrer un commentaire