@php if (!$course) { return; } $translations = $translations ?? parse_translation($course); $categoryTranslations = parse_translation($course->category); $currency = $course?->coursePrice->currency ?? 'USD-$'; $currencySymbol = get_currency_symbol($currency); @endphp
Course thumbnail @auth @php $class = user_wishlist_check($course->id) ? 'active' : ''; @endphp @else @endauth
{{ $categoryTranslations['title'] ?? ($course->category->title ?? '') }}
{{ $course->duration ?? 0 }}
{{ $course?->totalPurchases?->count() ?? 0 }} {{ translate('Student') }}
{{ $translations['title'] ?? ($course->title ?? '') }}
@foreach ($course->instructors as $instructor) @php $user = $instructor->userable ?? null; $userTranslations = parse_translation($user); @endphp
@php $imagePath = 'lms/instructors'; $defaultThumbnail = 'lms/assets/images/placeholder/profile.jpg'; $thumbnail = $user?->profile_img && fileExists($imagePath, $user->profile_img) ? asset('storage/' . $imagePath . '/' . $user->profile_img) : asset($defaultThumbnail); @endphp Instructor profile
{{ $userTranslations['first_name'] ?? ($user->first_name ?? '') }}
@endforeach
{!! show_rating($reviews['average_rating']) !!}

@if ($reviews['total_rating']) ({{ dotZeroRemove($reviews['average_rating']) ?? 0 }}) @endif

@if ($course?->courseSetting?->is_free)
{{ translate('Free') }}
@else
@if (isset($course?->coursePrice) && $course?->coursePrice?->discount_flag == 1 && $course?->coursePrice?->discount_period != '' && dateCompare($course?->coursePrice?->discount_period) == true) {{ $currencySymbol }}{{ dotZeroRemove($course?->coursePrice?->discounted_price ?? 0) }} {{ $currencySymbol }}{{ dotZeroRemove($course?->coursePrice?->price ?? 0) }} @else {{ $currencySymbol }}{{ dotZeroRemove($course?->coursePrice?->price ?? 0) }} @endif
@endif