@extends('frontend.maintemplate.maintemplate') @section('title', $courseCategory->name . ' :: AgeLess Institute') @section('content') @php $desc = $courseSubCategory->getTranslation('description', app()->getLocale()); $cleanDesc = trim(strip_tags($desc)); $charLimit = 410; // kept for compatibility, not used for button visibility @endphp
Overview {{-- {!! $courseSubCategory->description ?? '' !!} --}} {!! $desc !!}
@php $sr = 1 @endphp @php $topics_price = []; @endphp @foreach ($courses as $course)
@csrf
@if (!empty($course->show_on_details_page_data)) @foreach ($course->show_on_details_page_data as $columnName) @endforeach @endif @foreach ($course->courseTopics->sortBy('sequence_number') as $courseTopic) @php $types = []; @endphp @if (in_array('Level', $course->show_on_details_page_data)) @endif @if (in_array('Type', $course->show_on_details_page_data)) @endif @if (in_array('Practical Hours', $course->show_on_details_page_data)) @endif @if (in_array('Price', $course->show_on_details_page_data)) @endif @endforeach
Topics Covered {{ $columnName }}
@if (!empty($courseTopic->topic->url)) {{ $courseTopic->topic->title }} {{ $courseTopic->topic->title }} @else {{ $courseTopic->topic->title }} @endif {{ ucwords($courseTopic->level) }} @php $types = is_array( $courseTopic->types, ) ? $courseTopic->types : json_decode( $courseTopic->types, true, ); $typeStr = $types ? implode( ' + ', $types, ) : 'N/A'; @endphp {{ ucwords($typeStr) }} {{ !empty($courseTopic->topic->practical_hours) && $courseTopic->topic->practical_hours != 0 ? $courseTopic->topic->practical_hours . ' Hrs' : '-' }} @php $price = 0; if ($types) { foreach ($types as $type) { if ($type === 'theory') { $price += $courseTopic->theory_price; $topics_price[$courseTopic->course_id][$courseTopic->topic_id][$type] = $price; } if ($type === 'practical') { $price += $courseTopic->practical_price; $topics_price[$courseTopic->course_id][$courseTopic->topic_id][$type] = $price; } if($type === 'demo'){ $price += $courseTopic->demo_price; $topics_price[$courseTopic->course_id][$courseTopic->topic_id][$type] = $price; } // if($type === 'practical_only'){ // $price += $courseTopic->practical_only_price; // $topics_price[$courseTopic->course_id][$courseTopic->topic_id][$type] = $price; // } } } // $topics_price[ // $courseTopic->topic_id // ][$type] = $price; @endphp @if ($price > 0) ₹ {{ number_format($price) }} @else Complimentary @endif
@if($course->courseTopics->count() > 0)
@if($course->discounted_price != null)
Individual Course Price
₹ {{ number_format($course->fees_MRP, 0, '.', ',') }}
Discount
-₹ {{ number_format($course->fees_MRP - $course->current_fee) }}
@endif
Total Package Price
₹ {{ number_format($course->current_fee, 0, '.', ',') }}
@endif
@php $sr++ @endphp @endforeach
{{ $courseCategory->name ?? '' }} {{ $courseSubCategory->name ?? '' }}
Overview {{-- {!! $courseSubCategory->description ?? '' !!} --}} {!! $desc !!}

@if (!empty($courseSubCategory->sub_title)) {{ $courseSubCategory->sub_title ?? '' }} @endif

@csrf
@php $displayedTopics = []; @endphp @foreach ($courses as $course) @foreach ($course->courseTopics->sortBy('sequence_number') as $courseTopic) {{-- @foreach ($course->courseTopics as $courseTopic) --}} @php $topicId = $courseTopic->topic->id; @endphp @if (!in_array($topicId, $displayedTopics)) @php $displayedTopics[] = $topicId; @endphp @endif @endforeach @endforeach
Topics Covered Level Type Practical Hours Price
@if (!empty($courseTopic->topic->url)) {{ $courseTopic->topic->title }} {{ $courseTopic->topic->title }} @else {{ $courseTopic->topic->title }} @endif {{ ucwords($courseTopic->level) }}
@php $types = is_array( $courseTopic->types, ) ? $courseTopic->types : json_decode( $courseTopic->types, true, ); $typeStr = $types ? implode( ' + ', $types, ) : 'N/A'; @endphp @foreach ($types as $srk => $type)
topic->title === 'Advanced Foundation Course') checked disabled @endif>
@endforeach
@if ($typeStr == 'theory') - @else{{ $courseTopic->topic->practical_hours }} Hrs @endif @php $price = 0; if ($types) { foreach ($types as $type) { if ( $type === 'theory' ) { $price += $courseTopic->theory_price; } if ( $type === 'practical' ) { $price += $courseTopic->practical_price; } if( $type === 'demo' ){ $price += $courseTopic->demo_price; } // if( // $type === // 'practical_only' // ){ // $price += // $courseTopic->practical_only_price; // } } } @endphp @if ($price > 0) ₹ {{ number_format($price) }} @else Complimentary @endif
@if ($courses->sum(fn($c) => $c->courseTopics->count()) > 0)
Total Price
₹ 0
@endif
@endsection