dimanche 15 avril 2018

Laravel Checkbox not getting set correctly

Given the following code, all my checkboxes (roles) are marked as checked, even though the user only has one role.

Using Laravel and Spatie Laravel Permissions Package.

I tried the same code in Tinker and it comes back with True, False, False, so it should be working...

@foreach ($roles as $role)
    <div>
        <label>
            <input type="checkbox" value="" checked="">
            <span>
                
            </span>
        </label>
    </div>
@endforeach




Aucun commentaire:

Enregistrer un commentaire