@extends('admin.layouts.app') @section('title', 'All Agencies') @section('breadcrumb')
  • Agencies
  • @endsection @section('heading', 'All Agencies') @section('subheading', 'Manage registered real estate agencies and their team performance.') @section('actions') Add Agency @endsection @section('content') {{-- Stats --}}
    Total Agencies

    {{ $total }}

    Active

    {{ $active }}

    Agents in Agencies

    {{ $totalAgents }}

    Agency Listings

    {{ $totalListings }}

    {{-- Table --}}
    {{-- Toolbar --}}
    @forelse($agencies as $agency) @empty @endforelse
    Agency Location Agents Listings Status Joined Actions
    @if($agency->logo_url) @else
    {{ strtoupper(substr($agency->name, 0, 2)) }}
    @endif {{ $agency->name }}
    {{ $agency->city ? trim(($agency->city ?? '') . ', ' . ($agency->state ?? ''), ', ') : '—' }} {{ $agency->agent_profiles_count }} {{ $agency->listings_count ?? 0 }} @if(($agency->status ?? 'active') === 'active') Active @else Inactive @endif {{ $agency->created_at?->format('d M Y') }}
    @csrf @method('DELETE')
    No agencies yet. Add one.
    {{-- Pagination --}}

    Showing {{ $agencies->firstItem() ?? 0 }}-{{ $agencies->lastItem() ?? 0 }} of {{ $agencies->total() }}

    {{ $agencies->links() }}
    @if (session('success'))
    {{ session('success') }}
    @endif @endsection