@extends('admin.layout') @section('title', 'Dashboard') @section('subtitle', now()->format('l, F j, Y')) @section('content') @if ($maintenanceMode)
⚠️ Maintenance mode is ON. Users cannot access the app.
Change
@endif @if (! $registrationEnabled)
New registrations are disabled.
Change
@endif
@foreach ([ ['Users', $stats['users_total'], 'text-blue-600'], ['Active Today', $stats['users_active_today'], 'text-emerald-600'], ['Banned', $stats['users_banned'], 'text-red-600'], ['Admins', $stats['users_admins'], 'text-purple-600'], ['Categories', $stats['categories'], 'text-indigo-600'], ['Questions (Total)', $stats['questions_total'], 'text-slate-700'], ['Questions (Active)', $stats['questions_active'], 'text-emerald-600'], ['Achievements', $stats['achievements'], 'text-amber-600'], ['Daily Challenges', $stats['daily_challenges'], 'text-pink-600'], ['Quiz Sessions', $stats['quiz_sessions_total'], 'text-slate-700'], ['Sessions Today', $stats['quiz_sessions_today'], 'text-emerald-600'], ['Battles', $stats['battles_total'], 'text-slate-700'], ['Battles Today', $stats['battles_today'], 'text-emerald-600'], ['Total XP', number_format($stats['total_xp_awarded']), 'text-yellow-600'], ['Coins in Circulation', number_format($stats['total_coins_circulating']), 'text-yellow-600'], ] as [$label, $value, $color])
{{ $label }}
{{ $value }}
@endforeach

Top Players

All users →
@foreach ($topUsers as $u)
{{ $u->battle_name ?? $u->name }}
Level {{ $u->level }} · {{ $u->games_played }} games
{{ number_format($u->xp) }} XP
{{ number_format($u->coins) }} coins
@endforeach

Questions by Category

All questions →
@foreach ($questionsByCategory as $c)
{{ $c->label }}
{{ $c->questions_count }} questions
@endforeach

Recent Quiz Sessions

All →
@foreach ($recentSessions as $s)
{{ $s->user->battle_name ?? '—' }} · {{ $s->category->label ?? '—' }}
{{ $s->mode }} · {{ $s->created_at->diffForHumans() }}
{{ ucfirst($s->status) }}
@if ($s->grade)
Grade {{ $s->grade }}
@endif
@endforeach

Recent Battles

All →
@foreach ($recentBattles as $b)
{{ $b->challenger->battle_name ?? '—' }} vs {{ $b->is_bot_match ? ($b->bot_name ?? 'Bot') : ($b->opponent->battle_name ?? '—') }}
{{ $b->category->label ?? '—' }} · {{ $b->created_at->diffForHumans() }}
{{ $b->challenger_score }} – {{ $b->opponent_score }}
{{ ucfirst($b->status) }}
@endforeach
@endsection