{{ __('Permission management') }}

{{ __('Tick which permissions each role has. Changes are saved instantly.') }}

{{-- Crear rol / permiso --}}
@error('newRole') {{ $message }} @enderror
@error('newPermission') {{ $message }} @enderror
{{-- Matriz Roles × Permisos --}}
@foreach($roles as $role) @endforeach @forelse($permissions as $perm) @foreach($roles as $role) @endforeach @empty @endforelse
{{ __('Permission') }}
{{ $role->name }} @unless(in_array($role->name, ['Admin'], true)) @endunless
{{ $perm->name }} @if($perm->name !== 'manage all') @endif
permissions->contains('id', $perm->id)) wire:click="togglePermission({{ $role->id }}, '{{ $perm->name }}')" />
{{ __('No permissions') }}

{{ __('The Admin role and the "manage all" permission are protected and cannot be removed.') }}