@extends('layouts.admin') @section('title', 'Agency Console') @section('breadcrumb') ⚡ Super Admin Agency Console @endsection @section('content') {{-- KPI Grid --}}
Active Tenants
{{ $stats['active_tenants'] }}
+ {{ $stats['trialing'] }} trialing
Monthly Recurring Revenue
₹{{ number_format($stats['mrr']) }}
estimated MRR
Trials Active
{{ $stats['trialing'] }}
View all →
Past Due / At Risk
{{ $stats['past_due'] }}
@if($stats['past_due'] > 0) Requires attention → @endif
{{-- Recent Tenants --}}

Recent Tenants

View all →
@foreach($recentTenants as $tenant) @endforeach
Tenant Plan Status Last Active Actions
{{ strtoupper(substr($tenant->name, 0, 1)) }}
{{ $tenant->name }}
{{ $tenant->slug }}.{{ config('app.domain') }}
{{ $tenant->subscription?->plan?->display_name ?? 'No plan' }} {{ ucfirst($tenant->status) }} {{ $tenant->updated_at->diffForHumans() }}
@csrf
Manage
{{-- Churn Risk + Quick Actions --}}
{{-- Churn Risks --}}

⚠️ Churn Risk

{{ $churnRisks->count() }}
@if($churnRisks->isEmpty())
✓ No tenants at risk
@else
@foreach($churnRisks as $tenant)
{{ $tenant->name }}
@if($tenant->status === 'past_due') Payment overdue @elseif($tenant->status === 'trialing') Trial expiring soon @endif
@csrf
@endforeach
@endif
{{-- Quick Links --}}
Quick Actions
@foreach([ [route('superadmin.tenants.index'), 'All Tenants', '🏢'], [route('superadmin.billing.index'), 'Billing Console', '💳'], [route('superadmin.system.health'), 'System Health', '🖥'], [route('superadmin.analytics.index'), 'Cross-Tenant Analytics', '📊'], [route('superadmin.feature-flags.index'), 'Feature Flags', '🚩'], ] as [$url, $label, $icon]) {{ $icon }} {{ $label }} @endforeach
@endsection