@extends('admin.layouts.app') @section('title', 'All Agents') @section('breadcrumb')
  • Agents
  • @endsection @section('heading', 'All Agents') @section('subheading', 'Manage and view all registered agents on your platform.') @section('actions') Add Agent @endsection @section('content') @if (session('success'))
    {{ session('success') }}
    @endif @if (session('error'))
    {{ session('error') }}
    @endif {{-- Stats --}}

    {{ number_format($total) }}

    Total Agents

    {{ number_format($active) }}

    Active

    {{ number_format($newThisMonth) }}

    New This Month

    {{ $agents->total() }}

    On This Page

    Reset
    {{-- Table --}}
    @forelse($agents as $agent) @php $profile = $agent->agentProfile; @endphp @empty @endforelse
    Agent Phone Listings Status Joined Actions
    @if($profile?->profile_photo_url ?? $agent->avatar) @else
    {{ substr($agent->name, 0, 2) }}
    @endif

    {{ $agent->name }}

    {{ $agent->email }}

    {{ $profile?->phone ?? '—' }} {{ $agent->properties_count ?? 0 }} {{ $profile?->status ?? 'active' }} {{ $agent->created_at->format('d M Y') }}
    @csrf @method('DELETE')
    No agents yet. Add one.
    @if ($agents->hasPages())

    Showing {{ $agents->firstItem() ?? 0 }} to {{ $agents->lastItem() ?? 0 }} of {{ $agents->total() }} results

    {{ $agents->links() }}
    @endif
    @endsection