@include('Partials.sidebar')
@include('Partials.header')
{{-- Page Title --}}

Tenant Management

Manage all registered tenants on this platform

  1. ›
  2. Tenants
{{-- Flash Messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
{{-- Status Tabs — pill style matching Reports Overview tabs --}}
@php $tabs = [ 'all' => ['label' => 'All Tenants', 'icon' => 'fas fa-th-list'], 'pending' => ['label' => 'Pending', 'icon' => 'fas fa-clock'], 'approved' => ['label' => 'Approved', 'icon' => 'fas fa-thumbs-up'], 'active' => ['label' => 'Active', 'icon' => 'fas fa-check-circle'], 'rejected' => ['label' => 'Rejected', 'icon' => 'fas fa-times-circle'], 'suspended' => ['label' => 'Suspended', 'icon' => 'fas fa-ban'], ]; $currentStatus = request('status', 'all'); @endphp @foreach($tabs as $key => $tab) @php $isActive = $currentStatus === $key; $url = request()->fullUrlWithQuery(['status' => $key === 'all' ? null : $key, 'search' => request('search')]); $count = $key !== 'all' ? ($counts[$key] ?? 0) : $tenants->total(); @endphp {{ $tab['label'] }} {{ $count }} @endforeach
{{-- Search --}}
@if(request('search')) Clear @endif
Register Tenant
{{-- Table Card --}}
@forelse($tenants as $tenant) @empty @endforelse
# Company Slug Plan Billing Status Registered Actions
{{ $tenants->firstItem() + $loop->index }}
{{-- Avatar --}}
{{ strtoupper(substr($tenant->name, 0, 1)) }}
{{ $tenant->name }}
{{ $tenant->email }}
{{ $tenant->slug }}.{{ config('app.domain') }} @if($tenant->plan) {{ $tenant->plan->name }} @else — @endif @if($tenant->billing_cycle) @php $cycleIcon = match ($tenant->billing_cycle) { 'monthly' => 'fas fa-calendar-day', 'quarterly' => 'fas fa-calendar-week', 'yearly' => 'fas fa-calendar-alt', default => 'fas fa-calendar', }; @endphp {{ ucfirst($tenant->billing_cycle) }} @else — @endif @php $statusConfig = match ($tenant->status) { 'pending' => ['bg' => '#fff3cd', 'color' => '#856404', 'icon' => 'fas fa-clock'], 'approved' => ['bg' => '#d1ecf1', 'color' => '#0c5460', 'icon' => 'fas fa-thumbs-up'], 'active' => ['bg' => '#d4edda', 'color' => '#155724', 'icon' => 'fas fa-check-circle'], 'rejected' => ['bg' => '#f8d7da', 'color' => '#721c24', 'icon' => 'fas fa-times-circle'], 'suspended' => ['bg' => '#e2e3e5', 'color' => '#383d41', 'icon' => 'fas fa-ban'], default => ['bg' => '#e9ecef', 'color' => '#6c757d', 'icon' => 'fas fa-circle'], }; @endphp {{ ucfirst($tenant->status) }} {{ $tenant->created_at->format('d M Y') }} {{-- View --}} {{-- Approve (pending only) --}} @if($tenant->isPending())
@csrf
@endif {{-- Suspend (active only) --}} @if($tenant->isActive())
@csrf
@endif {{-- Re-activate (suspended only) --}} @if($tenant->isSuspended())
@csrf
@endif {{-- Delete (only when not active) --}} @if(!$tenant->isActive())
@csrf @method('DELETE')
@endif
No tenants found @if(request('search')) No results for "{{ request('search') }}". Clear search @else No tenants in this category yet. @endif
{{-- Pagination --}} @if($tenants->hasPages()) @endif
{{-- Reject Modal --}} @include('Partials.footer')