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