@foreach($roles as $role)
@include('components.custom-checkbox', [
'name' => $name . '[' . strval($role->id) . ']',
'label' => $role->display_name,
'value' => $role->id,
'checked' => old($name . '.' . strval($role->id)) || (!old('name') && isset($model) && $model->hasRole($role->id))
])
@endforeach
@if($errors->has($name))