@extends('layouts.admin')
@section('title', 'Users and roles')
@section('crumbs', 'Settings · Super Admin only')
@section('actions')Add admin user@endsection
@section('content')
Admin panel{{ $admins->count() }} users/admin/login · password + 6-digit code
Team workspace{{ $teamCount }} people/team/login · managed in Team directory
Client portal{{ $clientCount }} client users/client/login · invited from each client
| Name | Email | Role | Status | Last sign-in | |
@foreach($admins as $a)
| {{ $a->initials() }}{{ $a->name }} | {{ $a->email }} | {{ $a->roleLabel() }} | | {{ $a->last_login_at?->diffForHumans() ?? 'Never' }} | Edit |
@endforeach
What each role can open
@php($areas = ['dashboard' => 'Dashboard', 'crm' => 'Leads and clients', 'proposals' => 'Proposals', 'projects' => 'Projects and calendar', 'support' => 'Support tickets', 'finance' => 'Invoices, expenses, finance report', 'content' => 'Website content', 'analytics' => 'Website analytics', 'hr' => 'Team, attendance, leave', 'timesheets' => 'Timesheets', 'payroll' => 'Payroll', 'hiring' => 'Hiring', 'users' => 'Users, settings, activity log'])
| Area | @foreach(\App\Models\Admin::ROLES as $r => $l){{ $l }} | @endforeach
@foreach($areas as $k => $label)| {{ $label }} | @foreach(\App\Models\Admin::ROLES as $r => $l)@php($p = \App\Models\Admin::PERMISSIONS[$r] ?? []){{ $r === 'super_admin' || in_array($k, $p) ? '✓ Full' : (in_array($k.'.view', $p) ? 'View only' : '—') }} | @endforeach
@endforeach
Roles are defined in app/Models/Admin.php (PERMISSIONS). Team members and clients never see the admin panel; they have their own separate logins.
@endsection