@extends('layouts.app') @php($currency = setting('currency_symbol', 'KSh')) @section('title', 'Reports & Insights') @section('subtitle', 'Training, finance and fleet analytics') @section('content') Finance analytics

Revenue & enrollments

Monthly collections against new admissions

Booking status

Lessons & attendance

Lessons scheduled vs attendance rate

Readiness snapshot

@foreach ([['Average readiness', $progressSummary['average'].'%'], ['Test-ready students', $progressSummary['ready']], ['Final test passed', $progressSummary['passed']], ['Final test failed', $progressSummary['failed']]] as [$label, $value])
{{ $label }} {{ $value }}
@endforeach
@foreach ($typeCounts as $type => $count)
{{ \App\Models\Booking::TYPES[$type] ?? ucfirst($type) }} {{ $count }}
@endforeach

Course popularity

@php($maxCourse = max(1, $courses->max('students_count'))) @forelse ($courses as $course)
{{ $course->name }} ({{ $course->code }}) {{ $course->students_count }}
@empty @endforelse

Trainer performance

@forelse ($trainers as $trainer) @empty @endforelse
TrainerStudentsLessonsRating
{{ $trainer->user->name }}
{{ $trainer->specialization ?? $trainer->designation }}
{{ $trainer->active_students_count }} {{ $trainer->completed_bookings_count }}/{{ $trainer->bookings_count }} @if ($trainer->lesson_reports_avg_rating) {{ number_format($trainer->lesson_reports_avg_rating, 1) }} @else — @endif

Vehicle utilisation

@forelse ($vehicles as $vehicle) @empty @endforelse
VehicleStatusLessonsCompletedOdometer
{{ $vehicle->make }} {{ $vehicle->model }}
{{ $vehicle->registration_number }}
{{ \App\Models\Vehicle::STATUSES[$vehicle->status] ?? ucfirst($vehicle->status) }} {{ $vehicle->bookings_count }} {{ $vehicle->completed_count }} {{ number_format($vehicle->odometer_km) }} km

Invoice status

@php($totalPayments = max(1, $paymentStatusCounts->sum())) @foreach (\App\Models\Payment::STATUSES as $key => $label) @php($count = $paymentStatusCounts[$key] ?? 0)
{{ $label }} {{ $count }}
@endforeach
@endsection @push('scripts') @endpush