@extends('layouts.dashboard') @section('title', __('Reports')) @section('page_title', __('Reports')) @section('content') @include('partials.how-it-works', ['key' => 'instructor.reports'])

{{ __('Reports & Analytics') }}

{{ __('An overview of your teaching performance') }}

@include('partials.dashboard.stat-card', [ 'label' => 'Total Earnings', 'value' => money($totalEarnings), 'icon' => 'bi-cash-stack', 'color' => 'success', ])
@include('partials.dashboard.stat-card', [ 'label' => 'Total Students', 'value' => number_format($totalStudents), 'icon' => 'bi-people', 'color' => 'primary', ])
@include('partials.dashboard.stat-card', [ 'label' => 'Courses', 'value' => number_format($coursesCount), 'icon' => 'bi-journal-bookmark', 'color' => 'info', ])
@include('partials.dashboard.stat-card', [ 'label' => 'Avg. Rating', 'value' => number_format($avgRating, 2), 'icon' => 'bi-star-fill', 'color' => 'warning', ])
{{ __('Earnings (Last 12 Months)') }}
{{ __('Top Courses') }}
@forelse ($topCourses as $course) @empty @endforelse
{{ __('Course') }}{{ __('Enrollments') }}
{{ $course->title }} {{ number_format($course->total_enrollments) }}
{{ __('No courses yet.') }}
{{ __('Recent Sales') }}
@forelse ($recentSales as $item) @empty @endforelse
{{ __('Course') }}{{ __('Date') }}{{ __('Your Earning') }}
{{ $item->course->title ?? '—' }} {{ optional($item->order)->created_at?->format('M d, Y') ?? $item->created_at->format('M d, Y') }} {{ money($item->instructor_commission) }}
{{ __('No sales yet.') }}
@endsection @push('scripts') @endpush