@extends('frontend.maintemplate.maintemplate') @section('title', 'Course Details' . ' :: AgeLess Institute') @section('content')

{{ $course->category->name }}

({{ $course->name }})
Total Flying Hours : 116 Hrs

{{ $course->description }}

{{-- --}}
{{-- --}} {{-- @foreach ($course->courseTopics as $courseTopic) @endforeach --}} @foreach ($course->courseTopics as $courseTopic) @php $topicId = $courseTopic->topic->id; $isPurchasedTopic = in_array($topicId, $purchasedTopics); @endphp {{-- ✅ Case 1: Show Foundation Topic only if the student has completed it --}} @if ($courseTopic->topic->id == env('FOUNDATION_TOPIC_ID') && $showFoundationTopic) {{-- ✅ Case 2: If NOT Foundation Topic, Check if Course is Purchased --}} @elseif ($courseTopic->topic->id != env('FOUNDATION_TOPIC_ID')) {{-- 🔹 If Course is Purchased and "is_customised_course" is 1, Show Only Purchased Topics --}} @if ($checkCoursePurchase && $checkCoursePurchase->is_customised_course == 1) @if ($isPurchasedTopic) @endif @else {{-- 🔹 Show All Topics Normally (When Course is NOT Purchased or is_customised_course == 0) --}} @endif @endif @endforeach
TopicTopicChapter
{{ $courseTopic->topic->title }} @foreach ($courseTopic->topicsChapters as $index => $topicsChapter)

{{ $loop->iteration }}. {{ $topicsChapter->chapter->name }}

@endforeach
{{ $courseTopic->topic->title }} @foreach ($courseTopic->topicsChapters as $topicsChapter)

{{ $loop->iteration }}. {{ $topicsChapter->chapter->name }}

@endforeach
{{ $courseTopic->topic->title }}
@csrf
@foreach ($courseTopic->topicsChapters as $topicsChapter)

{{ $loop->iteration }}. {{ $topicsChapter->chapter->name }}

@endforeach
{{ $courseTopic->topic->title }}
@csrf @php $topicId = $courseTopic->topic->id; $statuses = $topicProgress[$topicId] ?? []; $status1 = $statuses['read_book'] ?? 'pending'; $status2 = $statuses['watch_video'] ?? 'pending'; $status3 = $statuses['mcq'] ?? 'pending'; $btnMap = function($status) { return [ 'text' => $status === 'pending' ? 'Start' : ($status === 'inprogress' ? 'Complete' : 'Completed'), 'class' => $status === 'inprogress' ? 'btn-success' : ($status === 'complete' ? 'btn-secondary' : 'btn-primary'), ]; }; $b1 = $btnMap($status1); $b2 = $btnMap($status2); $b3 = $btnMap($status3); @endphp
Step 1 Read Book {{ $status1 }}
Step 2 Watch Video {{ $status2 }}
Step 3 MCQ {{-- --}} {{-- --}} {{ $status3 }}
{{-- --}}
@foreach ($courseTopic->topicsChapters as $topicsChapter)

{{ $loop->iteration }}. {{ $topicsChapter->chapter->name }}

@endforeach
@foreach ($practicalSessions as $session) @if ($session->practicalsession) @else @endif @endforeach
Title Time Model Required Action
{{ $session->practicalsession->title }} {{ intdiv($session->practicalsession->time, 60) }}:{{ str_pad($session->practicalsession->time % 60, 2, '0', STR_PAD_LEFT) }} HRS {{ $session->practicalsession->model_required ? 'Yes' : 'No' }} Schedule Practical {{-- Schedule Practical --}}
No practical session available for this course.
@forelse($bookedSessions as $key => $session) @empty @endforelse
# Date Time Slot Session ID Location Required Device Required Model Required Status
{{ $key + 1 }} {{ \Carbon\Carbon::parse($session->date)->format('Y-m-d') }} {{ $session->time_slot }} {{ $session->session_id }} {{ $session->location_required ? 'Yes' : 'No' }} {{ $session->device_required ? 'Yes' : 'No' }} {{ $session->model_required ? 'Yes' : 'No' }} {{ ucfirst($session->status) }}
No booked sessions found.
{{-- --}} @endsection