@extends('layouts.admin') @section('title', 'User Analytics') @section('content')

User Analytics

Detailed insights into user behavior and demographics

Total Users

{{ $metrics['total_users'] ?? '0' }}

+{{ $metrics['user_growth'] ?? '0' }}% this month
Active Users

{{ $metrics['active_users'] ?? '0' }}

+{{ $metrics['active_growth'] ?? '0' }}% this week
New This Month

{{ $metrics['new_users'] ?? '0' }}

{{ $metrics['new_user_percentage'] ?? '0' }}% of total
Retention Rate

{{ $metrics['retention_rate'] ?? '0' }}%

Above average
User Registration Timeline
User Demographics
Students
{{ $demographics['students'] ?? '0' }}%
Instructors
{{ $demographics['instructors'] ?? '0' }}%
Parents
{{ $demographics['parents'] ?? '0' }}%
Recent User Activity
@forelse($users ?? [] as $user) @empty @endforelse
User Role Last Login Activity Score Status Actions
{{ substr($user->name ?? 'U', 0, 1) }}
{{ $user->name ?? 'Unknown User' }}

{{ $user->email ?? 'No email' }}

{{ $user->role ?? 'Student' }}
{{ $user->activity_score ?? '50' }}%
@if($user->is_active ?? true) Active @else Inactive @endif
No user data available
@endsection @section('scripts') @endsection