@extends('layouts.users.main') @section('content')

{{ __('Roles and permissions') }}

{{ __('Roles are defined in code. Here you only change which permissions each one grants.') }}

{{ __('Superadmin only') }}
{{-- The one thing that must be understood before touching anything here. --}}
@foreach ($roles as $role) @php $isSuperadmin = $role->name === 'superadmin'; $rank = $hierarchy[$role->name] ?? null; @endphp @endforeach
{{ __('Role') }} {{ __('Rank') }} {{ __('Users') }} {{ __('Permissions') }} {{ __('Actions') }}
{{ __(ucfirst(str_replace('_', ' ', $role->name))) }} {{ $role->name }}
@if ($rank !== null) {{ $rank }} @else {{-- Not in config/roles.php: roleRank() would return 0 for its users. --}} @endif {{ $role->users_count }} {{ $role->permissions_count }} {{-- Read-only: permissions come from PermissionSeeder, which the deploy re-runs. Every role is viewable, superadmin included. --}} {{ __('View permissions') }}
@endsection