@extends('admin.layouts.home') @section('title', 'Course Statistics') @section('content')

Course Statistics

Back to Courses
Total Courses
{{ $totalCourses }}
Published Courses
{{ $publishedCourses }}
Featured Courses
{{ $featuredCourses }}
Total Students
{{ $totalStudents }}
Total Revenue
${{ number_format($totalRevenue, 2) }}
Top Course Categories
@forelse($topCategories as $category) @empty @endforelse
Category Name Total Courses Status
{{ $category->name }} {{ $category->courses_count }} {{ $category->is_active ? 'Active' : 'Inactive' }}
No categories found
Popular Courses
@forelse($popularCourses as $popularCourse) @empty @endforelse
Course Title Instructor Category Students Rating Status
{{ $popularCourse->title }} {{ $popularCourse->instructor->name ?? 'N/A' }} {{ $popularCourse->category->name ?? 'N/A' }} {{ $popularCourse->total_students ?? 0 }} @if($popularCourse->average_rating) {{ number_format($popularCourse->average_rating, 1) }} @else No ratings @endif {{ $popularCourse->is_published ? 'Published' : 'Draft' }}
No popular courses found
@endsection