{{-- نموذج الدور المشترك بين الإضافة والتعديل --}} @php $isAdmin = $role && $role->name === 'Admin'; $checked = array_map('intval', old('permission', $rolePermissions ?? [])); $total = collect($groups)->sum(fn ($g) => count($g['items'])); @endphp @if ($errors->any())
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif
@if($isAdmin)
{{ __('roles.admin_note') }}
@endif
{{ __('roles.permissions') }} {{ count($checked) }} / {{ $total }} {{ __('roles.selected') }}
@foreach ($groups as $key => $g)
{{ $g['label'] }}
@foreach ($g['items'] as $p) @endforeach
@endforeach
{{ __('roles.cancel') }}