@extends('layouts.dashboard') @section('title', __('Course Detail')) @section('page_title', __('Course Detail')) @php $statusBadges = [ 'draft' => 'secondary', 'pending' => 'warning', 'approved' => 'success', 'rejected' => 'danger', ]; @endphp @section('content')
{{ $course->title }}
{{ __('Enrollments') }} {{ __('Back') }}
@if($course->short_description)

{{ $course->short_description }}

@endif
{{ __('Description') }}
{!! nl2br(e(html_to_plain_text($course->description))) !!}
{{ __('Details') }}
  • {{ __('Approval') }} {{ status_label($course->approval_status) }}
  • {{ __('Published') }} @if($course->is_published){{ __('Yes') }}@else{{ __('No') }}@endif
  • {{ __('Instructor') }}{{ $course->instructor->name ?? '—' }}
  • {{ __('Category') }}{{ $course->category->name ?? '—' }}
  • {{ __('Level') }}{{ __($course->level->name ?? '—') }}
  • {{ __('Language') }}{{ $course->language ?? '—' }}
  • {{ __('Type') }}{{ status_label($course->course_type ?? null) }}
  • {{ __('Price') }} @if($course->isFree()){{ __('Free') }}@else {{ money($course->currentPrice()) }} @endif
  • {{ __('Enrolled') }}{{ $course->total_enrollments }}
  • {{ __('Rating') }}{{ $course->average_rating }} ({{ $course->reviews()->count() }})
{{ __('Revenue split') }}
@php($share = \App\Support\Commission::instructorShare($course)) @php($source = \App\Support\Commission::source($course))
{{ __('Instructor gets') }}{{ rtrim(rtrim(number_format($share, 2), '0'), '.') }}%
{{ __('Platform keeps') }}{{ rtrim(rtrim(number_format(100 - $share, 2), '0'), '.') }}%
{{ __('Source:') }} {{ ['course' => __('this course'), 'instructor' => __('instructor profile'), 'global' => __('global admin commission')][$source] }}
@csrf @method('PATCH') %
{{ __('Instructor share for this course only. Leave empty to inherit.') }}
{{ __('Review & Status') }}
@csrf @method('PATCH')

@csrf @method('PATCH')
@csrf @method('PATCH')
@endsection