@php if (!$course) { return; } $translations = $translations ?? parse_translation($course); $categoryTranslations = parse_translation($course->category); $reviews = review($course); $imagePath = 'lms/courses/thumbnails'; $defaultThumbnail = 'lms/frontend/assets/images/370x396.svg'; $thumbnail = !empty($course?->thumbnail) && fileExists($imagePath, $course->thumbnail) ? asset('storage/' . $imagePath . '/' . $course->thumbnail) : asset($defaultThumbnail); $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
{!! show_rating($reviews['average_rating']) !!}

{{ dotZeroRemove($reviews['average_rating']) }}

{{ $categoryTranslations['title'] ?? $course->category->title }}
{{ $translations['title'] ?? ($course->title ?? '') }}
{{ $course->duration ?? 0 }}
{{ $course->chapters?->count() ?? 0 }} {{ translate('Lessons') }}
{{ $course->students?->count() ?? 0 }} {{ translate('Students') }}
@php $instructors = $course?->instructors; @endphp @if (!empty($instructors)) @foreach ($instructors as $instructor) @php $user = $instructor->userable ?? null; $imagePath = 'lms/instructors'; $defaultThumbnail = 'lms/assets/images/placeholder/profile.jpg'; $thumbnail = !empty($user?->profile_img) && fileExists($imagePath, $user->profile_img) ? asset('storage/' . $imagePath . '/' . $user->profile_img) : asset($defaultThumbnail); $userTranslations = parse_translation($user); @endphp
Course instructor
{{ $userTranslations['first_name'] ?? ($user->first_name ?? '') }} {{ $userTranslations['last_name'] ?? ($user->last_name ?? '') }}
@endforeach @endif
@php $coursePrice = $course?->coursePrice; $isDiscounted = isset($coursePrice) && $coursePrice->discount_flag == 1 && !empty($coursePrice->discount_period) && dateCompare($coursePrice->discount_period); $finalPrice = $isDiscounted ? dotZeroRemove($coursePrice->discounted_price ?? 0) : dotZeroRemove($coursePrice->price ?? 0); $originalPrice = $isDiscounted ? dotZeroRemove($coursePrice->price ?? 0) : null; @endphp {{ $currencySymbol }}{{ $finalPrice }} @if ($originalPrice) {{ $currencySymbol }}{{ $originalPrice }} @endif