I have a collection of checkboxes in my application. What I want to do is validate whether at least one is checked and enable a submit button. Basically a front end validation. According to the current code, the user must select all the checkboxes. I know this should be a small issue but as I am new to Laravel framework it's a little bit confusing for me to understand. Please, someone, help me here.
@foreach ($roles as $role)
<li>
{{ Form::checkbox('roles[]', $role->id, null, ['class="role-li"', 'required']) }}
{{ Form::label($role->name, ucfirst($role->name)) }}
</li>
@endforeach