@php if (!$course) { return; } $translations = $translations ?? parse_translation($course); $currency = $course?->coursePrice->currency ?? 'USD-$'; $currencySymbol = get_currency_symbol($currency); // Determine badge text $badgeText = $course?->courseSetting?->is_free ? translate('Free') : (isset($course?->coursePrice) && $course?->coursePrice?->discount_flag == 1 && $course?->coursePrice?->discount_period != '' && dateCompare($course?->coursePrice?->discount_period) ? $currencySymbol . dotZeroRemove($course?->coursePrice?->discounted_price ?? 0) : $currencySymbol . dotZeroRemove($course?->coursePrice?->price ?? 0)); // Determine thumbnail source $thumbnailPath = 'storage/lms/courses/thumbnails/' . $course->thumbnail; $defaultThumbnail = 'lms/frontend/assets/images/370x396.svg'; $thumbnail = fileExists('lms/courses/thumbnails', $course->thumbnail) && $course->thumbnail !== '' ? asset($thumbnailPath) : asset($defaultThumbnail); @endphp
{{ $badgeText }} Course thumbnail @auth @php $class = user_wishlist_check($course->id) ? 'active' : ''; @endphp @else @endauth
{{ $translations['title'] ?? ($course->title ?? '') }}
{{ $course?->chapters?->count() ?? 0 }} {{ translate('Lessons') }}
{{ $course?->totalPurchases?->count() ?? 0 }} {{ translate('Student') }}