@extends('layouts.app') @section('title', 'Role Permissions') @push('style') @endpush @section('content')

Role Permissions

Manage roles, permission bundles, and access rules from one place.
@if(session('success'))
{{ session('success') }}
@endif @if($errors->has('role'))
{{ $errors->first('role') }}
@endif
Create Role
Add a new role that can later be attached to users.
@csrf
Use lowercase snake_case to keep role names consistent with the rest of the app.
Available Permissions
These permissions can be assigned to any role.
@foreach($permissions as $permission) {{ $permission->name }} @endforeach
Access Model

Routes and module actions now follow permissions instead of fixed role rules, so admin can change access without code edits.

Role Matrix
Review which permissions each role currently has.
{{ $roles->count() }} Roles
@foreach($roles as $role)
{{ \Illuminate\Support\Str::headline($role->name) }}
{{ $role->name }}
#{{ $role->id }}
@forelse($role->permissions as $permission) {{ $permission->name }} @empty No permissions assigned. @endforelse
{{ $role->permissions->count() }} Permissions
{{ $role->assigned_users_count }} Users
Edit Role
@csrf @method('DELETE')
@endforeach
@endsection