@extends('layouts.dashboard') @section('title', 'Admin Management') @section('page-title', 'Admin Management') @section('content')
Manage Administrators

Create and manage admin accounts with different access levels

Add Admin
@forelse($admins as $admin) @empty @endforelse
Admin Email Role Status Managed Users Last Login Actions
{{ strtoupper(substr($admin->name, 0, 2)) }}
{{ $admin->name }}
@if($admin->created_by) Created by: {{ $admin->createdBy->name ?? 'Unknown' }} @endif
{{ $admin->email }} @if($admin->isSuperAdmin()) Super Admin @else Admin @endif @if($admin->is_active) Active @else Inactive @endif @if($admin->isSuperAdmin()) All Users @else {{ $admin->getManagedUserCount() }} / {{ $admin->limits->max_users ?? 10 }} @endif @if($admin->last_login_at) {{ $admin->last_login_at->diffForHumans() }} @else Never @endif
No admins found
@if($admins->hasPages())
{{ $admins->links() }}
@endif
{{ App\Models\Admin::where('role', 'superadmin')->count() }}
Super Admins
{{ App\Models\Admin::where('role', 'admin')->count() }}
Regular Admins
{{ App\Models\Admin::where('is_active', true)->count() }}
Active Admins
@endsection