@extends('admin.layouts.app') @section('title', 'Manage Admins') @section('content')
@if(session('success')) @endif

Manage Admins

Create New Admin
{{-- Loop through $admins passed from the controller --}} @forelse($admins as $admin) @empty @endforelse
Name Email Phone Role Status Actions
{{ $admin->name }} {{ $admin->email }} {{ $admin->phone ?? 'N/A' }} @if($admin->role == 'super_admin') {{ $admin->role }} @else {{ $admin->role }} @endif @if($admin->is_active) Active @else Inactive @endif {{-- Prevent deleting the main super admin (ID 1) or self --}} @if($admin->id != 1 && $admin->id != auth('admin')->id())
@csrf @method('DELETE')
@endif
No admins found.
@endsection