@extends('admin.layouts.home') @section('title', 'Course Details') @php use Illuminate\Support\Facades\Storage; @endphp @section('content')
@if(session('success'))
{{ session('success') }}
@endif
@if($course->thumbnail) {{ $course->title }} @else
@endif

{{ $course->title }}

{{ $course->category->name ?? 'N/A' }}

{{ $course->is_published ? 'Published' : 'Draft' }} @if($course->is_featured) Featured @endif {{ ucfirst($course->level) }} {{ $course->language }}
Price: @if($course->price == 0) Free @else ${{ number_format($course->price, 2) }} @if($course->discount_price)
${{ number_format($course->discount_price, 2) }} @endif @endif
Students: {{ $course->total_students ?? 0 }}
Lessons: {{ $course->total_lessons ?? 0 }}
Rating: @if($course->average_rating) {{ number_format($course->average_rating, 1) }} ({{ $course->total_reviews ?? 0 }} reviews) @else No ratings yet @endif
Course Information
Instructor: {{ $course->instructor->name ?? 'N/A' }}
Category: {{ $course->category->name ?? 'N/A' }}
Level: {{ ucfirst($course->level) }}
Language: {{ $course->language }}
Created On: {{ $course->created_at->format('M d, Y') }}
Last Updated: {{ $course->updated_at->format('M d, Y') }}
Course Statistics
Total Students: {{ $course->total_students ?? 0 }}
Total Lessons: {{ $course->total_lessons ?? 0 }}
Total Duration: {{ $course->total_duration ?? 0 }} minutes
Total Reviews: {{ $course->total_reviews ?? 0 }}
Average Rating: @if($course->average_rating) {{ number_format($course->average_rating, 1) }} @else No ratings yet @endif
Enrollments: {{ $enrollments->total() }}
Course Description
{!! nl2br(e($course->description)) !!}
@if($course->requirements)
Requirements
{!! nl2br(e($course->requirements)) !!}
@endif @if($course->what_you_will_learn)
What You Will Learn
{!! nl2br(e($course->what_you_will_learn)) !!}
@endif @if($course->target_audience)
Target Audience
{!! nl2br(e($course->target_audience)) !!}
@endif @if($course->preview_video)
Preview Video
@endif
@endsection