<input class="form-check-input" name="category[{{$category->id}}][{{$role->id}}]" value="{{$role->id}}" type="checkbox"
@if(in_array($role->id, $category->roles()->pluck('id')->all())) checked @endif>
<input type="hidden" name="category[42][11]" value="0" class="form-check-input" />
<input type="checkbox" name="category[42][11]" value="1" class="form-check-input" />