2016-02-27 20:24:42 +01:00
|
|
|
|
2019-02-03 14:45:45 +01:00
|
|
|
<div class="toggle-switch-list dual-column-content">
|
|
|
|
@foreach($roles as $role)
|
|
|
|
<div>
|
|
|
|
@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))
|
|
|
|
])
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
2016-02-27 20:24:42 +01:00
|
|
|
|
|
|
|
@if($errors->has($name))
|
|
|
|
<div class="text-neg text-small">{{ $errors->first($name) }}</div>
|
|
|
|
@endif
|