@extends('layouts.app') @section('title', 'Admin Dashboard') @section('page-title', 'Admin Dashboard') @section('content')

Welcome back, {{ Auth::user()->username }}! 👋

Here's your system overview and recent activities.

Total Users
{{ $stats['total_users'] ?? 0 }}
Students
{{ $stats['total_students'] ?? 0 }}
Teachers
{{ $stats['total_teachers'] ?? 0 }}
Active Batches
{{ $stats['active_batches'] ?? 0 }}
Total Batches
{{ $stats['total_batches'] ?? 0 }}
Today's Classes
{{ $stats['today_classes'] ?? 0 }}
Open Tickets
{{ $stats['open_tickets'] ?? 0 }}
Recent Users
{{ $recentUsers->count() ?? 0 }}
@if($recentUsers && $recentUsers->count() > 0)
@foreach($recentUsers as $user)
@if($user->user_type === 'student') @elseif($user->user_type === 'teacher') @else @endif
{{ $user->username }}
{{ $user->email }}
{{ $user->created_at->diffForHumans() }}
{{ ucfirst($user->user_type) }}
@endforeach
@else

No users found

New user registrations will appear here
@endif
Recent Complaint Tickets
{{ $recentTickets->count() ?? 0 }}
@if($recentTickets && $recentTickets->count() > 0)
@foreach($recentTickets as $ticket)
{{ $ticket->subject }}
{{ ucfirst($ticket->status) }}

{{ $ticket->student->user->name ?? $ticket->student->user->username ?? 'Unknown Student' }}

{{ Str::limit($ticket->description, 100) }}

{{ $ticket->created_at->diffForHumans() }}
@endforeach
@else

No complaint tickets found

New complaint tickets will appear here
@endif
@endsection @section('scripts') @endsection