vendredi 31 mai 2019

Check checked checkbox in Laravel

I have this code:

$arrayWithSelectedValues = [[user_id] => 3,[language_id] => 2], [user_id] => 3,[language_id] => 12]]

And I have checkbox :

@foreach($languages as $language)
<fieldset>
<input type="checkbox"
   class="icheckbox_square-red"
   id="input-15" name="languages[]"
   value="">
<label for="input-15"></label>
</fieldset>
@endforeach

How can I mark checkboxes as marked - those that have language_id from the array = $ language-> id?



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2JQX202
via IFTTT

1 commentaire:

  1. How To Retrieve Check Box Value In Laravel

    We can retrieve check box value in table using controller. Here you can see, we use the variable like product which passed from the controller and used it in table for getting database records..

    For More Info:- How To Retrieve Check Box Value In Laravel

    RépondreSupprimer