@push('title') Dashboard @endpush {{-- ══════════════ PAGE HEADER ══════════════ --}}

Admin Dashboard

{{ now()->format('l, d F Y') }} · Overview

Live Analytics
{{-- ══════════════ FLASH MESSAGES ══════════════ --}} @if(session('success')) @endif {{-- ══════════════ STAT CARDS ROW ══════════════ --}}
{{-- Total Revenue --}}
Total Revenue

${{ number_format($totalRevenue, 2) }}

${{ number_format($revenueMonth, 2) }} this month

{{-- Total Users --}}
Total Users

{{ number_format($totalUsers) }}

+{{ $newUsersMonth }} joined this month

{{-- Active Subscriptions --}}
Subscriptions

{{ $totalSubs }}

{{ $activeSubs }} active · {{ $expiredSubs }} expired

{{-- API Keys --}}
API Keys

{{ $totalKeys }}

{{ $activeKeys }} active · {{ $disabledKeys }} disabled

{{-- ══════════════ ALERT: EXPIRING SOON ══════════════ --}} @if($expiringSoon > 0)

{{ $expiringSoon }} subscription{{ $expiringSoon > 1 ? 's are' : ' is' }} expiring within 7 days

Notify affected users to renew before they lose access.

Review Now
@endif {{-- ══════════════ CHARTS ROW ══════════════ --}}
{{-- Revenue Chart --}}
Revenue Overview
Last 6 Months
{{-- Plan Breakdown --}}
Plan Breakdown
@foreach($planBreakdown as $plan => $count)
{{ $plan ?: 'Unknown' }}
{{ $count }} ({{ $totalSubs > 0 ? round(($count / $totalSubs) * 100) : 0 }}%)
@endforeach @if($planBreakdown->isEmpty())

No subscriptions yet

@endif
{{-- ══════════════ USER GROWTH + QUICK STATS ══════════════ --}}
{{-- User Growth Chart --}}
User Growth
Last 6 Months
{{-- Quick Stats Panel --}}
Quick Stats
  • Verified Users
    {{ $verifiedUsers }} / {{ $totalUsers }}
  • Deleted Accounts
    {{ $deletedUsers }}
  • New Users (Month)
    {{ $newUsersMonth }}
  • Expiring Soon
    {{ $expiringSoon }}
  • Revenue This Month
    ${{ number_format($revenueMonth, 2) }}
  • Active API Keys
    {{ $activeKeys }}
{{-- ══════════════ RECENT SUBS + ACTIVITY ══════════════ --}}
{{-- Recent Subscriptions --}}
Recent Subscriptions
View All
@if($recentSubs->isEmpty())
🛒

No subscriptions yet

@else
    @foreach($recentSubs as $sub)
  • {{-- Avatar --}} @if($sub->user && $sub->user->profile_picture && !str_starts_with($sub->user->profile_picture, 'avt') && file_exists(public_path('assets/img/avatars/' . $sub->user->profile_picture))) @else
    {{ strtoupper(substr($sub->user ? $sub->user->name : 'U', 0, 1)) }}
    @endif

    {{ $sub->user ? $sub->user->name : 'N/A' }}

    {{ $sub->plan_type }} · {{ $sub->created_at->diffForHumans() }}

    ${{ number_format($sub->amount, 2) }}

    {{ ucfirst($sub->status) }}
  • @endforeach
@endif
{{-- Recent Activity --}}
Recent Activity
@can('activity_management') View All @endcan
@if($recentActivity->isEmpty())
📋

No activity yet

@else
    @foreach($recentActivity as $log) @php $iconMap = [ 'created' => ['icon' => 'bx-plus-circle', 'color' => 'text-success'], 'updated' => ['icon' => 'bx-edit-alt', 'color' => 'text-primary'], 'deleted' => ['icon' => 'bx-trash', 'color' => 'text-danger'], 'login' => ['icon' => 'bx-log-in', 'color' => 'text-info'], ]; $logStyle = $iconMap[$log->action] ?? ['icon' => 'bx-circle', 'color' => 'text-muted']; @endphp
  • {{ $log->description }}

    {{ $log->user ? $log->user->name : 'System' }} · {{ $log->created_at->diffForHumans() }}

    {{ $log->action }}
  • @endforeach
@endif
{{-- ══════════════ CHART.JS SCRIPTS ══════════════ --}} @push('scripts') @endpush