@extends('layouts.admin') @section('title', 'Roles & Permissions') @section('content') @php($canManage = auth()->user()?->hasPermission('roles', 'manage'))

Roles & Permissions

Create named roles with module-level permissions and assign them to staff.

@if($canManage) Create Role @endif
Role Description Modules Granted Users Actions @forelse($roles as $role) @php($perms = (array) ($role->permissions ?? []))
{{ $role->name }}
{{ $role->slug }} @if($role->is_system) System @endif
{{ $role->description ?: '—' }} @if(empty($perms)) No permissions @else
@foreach($perms as $moduleKey => $actions) @php($mod = $modules[$moduleKey] ?? null) @if($mod) {{ $mod['label'] }} @endif @endforeach
@endif {{ $role->users_count }}
@if($canManage) @if(! $role->is_system)
@csrf @method('DELETE')
@endif @else @endif
@empty No roles defined yet. @endforelse
Assign roles to staff users from Users. Users with the Admin type always have unrestricted access, regardless of the role assigned.
@endsection