@php $thumb = $course->thumbnail; $thumbUrl = null; if (!empty($thumb)) { if (\Illuminate\Support\Str::startsWith($thumb, ['http://', 'https://'])) { $thumbUrl = $thumb; } else { $normalized = ltrim($thumb, '/'); if (\Illuminate\Support\Str::startsWith($normalized, 'storage/')) { $normalized = \Illuminate\Support\Str::after($normalized, 'storage/'); } $thumbUrl = \Illuminate\Support\Facades\Storage::disk('public')->url($normalized); } } $showCreateBatchModal = request()->boolean('create') || old('_batch_form') === 'create'; @endphp
@if($thumbUrl) {{ $course->title }} @endif

{{ $course->title }}

@if($course->status === 'active') Active @else Inactive @endif {{ $course->batches->count() }} {{ Str::plural('batch', $course->batches->count()) }}
@can('editCourse') Edit @endcan @can('create', \Modules\Batch\Models\Batch::class) @endcan @can('viewAny', \Modules\Batch\Models\Batch::class) Manage Batches @endcan
{{-- Main content --}}
{{-- Pricing --}}
{{-- Online --}}
Online
Old price
@if(!is_null($course->online_old_price)) ৳ {{ number_format((float) $course->online_old_price, 2) }} @else — @endif
Discount price
@if(!is_null($course->online_discount_price)) ৳ {{ number_format((float) $course->online_discount_price, 2) }} @else — @endif
{{-- Offline --}}
Offline (In-person)
Old price
@if(!is_null($course->offline_old_price)) ৳ {{ number_format((float) $course->offline_old_price, 2) }} @else — @endif
Discount price
@if(!is_null($course->offline_discount_price)) ৳ {{ number_format((float) $course->offline_discount_price, 2) }} @else — @endif
{{-- Thumbnail (if set) --}} @if($thumbUrl)
{{ $course->title }}
@endif {{-- Description --}}

Course Description

{!! $course->description !!}
{{-- Sidebar --}}
{{-- Batches --}}
Batches
{{ $course->batches->count() }}
@forelse($course->batches as $batch)
{{ $batch->name }} @php $statusColors = [ 'running' => 'bg-emerald-50 text-emerald-700 ring-emerald-100', 'upcoming' => 'bg-sky-50 text-sky-700 ring-sky-100', 'ended' => 'bg-slate-100 text-slate-600 ring-slate-200', ]; $sc = $statusColors[$batch->status] ?? 'bg-slate-100 text-slate-600 ring-slate-200'; @endphp {{ ucfirst($batch->status) }}
{{ $batch->students_count }} students {{ $batch->mentors_count }} mentors
@can('view', $batch) Open batch @endcan
@empty

No batches yet

@can('create', \Modules\Batch\Models\Batch::class) @endcan
@endforelse
{{-- Course meta --}}
Course Info
Slug {{ $course->slug }}
Created {{ optional($course->created_at)->format('d M, Y') }}
Last updated {{ optional($course->updated_at)->format('d M, Y') }}
@can('create', \Modules\Batch\Models\Batch::class)

New Batch

Create batch

This batch will be added under {{ $course->title }}.

@include('batch::admin.batches.partials.create-form', [ 'modalName' => 'create-batch', 'includeCourseSelect' => false, 'course' => $course, ])
@endcan