@if($offer = $product->offers()->where('activate',1)->whereHas('model_display_in',function ($query){$query->where('display_in_id',2);})->latest()->first())
@if(!$product->image_ar)
@else
@endif
@else
@if(!$product->image_ar)
@else
@endif
@endif
@if($offer = $product->offers()->whereHas('model_display_in',function ($query){$query->where('display_in_id',2);})->where('activate',1)->latest()->first())
{{$product->product_prices->first()->price . $product->product_prices->first()->currency->ar}}
{{$offer->amount . $product->product_prices->first()->currency->ar}}
@else
{{($product->product_prices->first())?$product->product_prices->first()->price . $product->product_prices->first()->currency->ar:''}}
@endif
{{($product->course_levels->first())?$product->course_levels->first()->hours:''}} ساعة
10 محاضرة
@if($offer = $product->offers()->where('activate',1)->whereHas('model_display_in',function ($query){$query->where('display_in_id',2);})->latest()->first())
{{$product->name_ar}}
@else
{{$product->name_ar}}
@endif
15 تقييم
@php
$course_level_ids = $product->course_levels->pluck('id')->toArray();
$course_ids = \App\Models\Course::whereIn('course_level_id',$course_level_ids)->pluck('id');
$total_students = \App\Models\CourseCustomer::whereIn('course_id',$course_ids)->where('status','ended')->count();
@endphp
{{$total_students}} طالب
@if($offer = $product->offers()->where('activate',1)->whereHas('model_display_in',function ($query){$query->where('display_in_id',2);})->latest()->first())
المزيد
@livewire('pro-online.add-to-card-component',['model_type' => 'App\\Models\\Offer' , 'model_id' => $offer->id,'page' => 'home_page'], key($offer->id))
@else
المزيد
@livewire('pro-online.add-to-card-component',['model_type' => 'App\\Models\\Product' , 'model_id' => $product->id,'page' => 'home_page'], key($product->id))
@endif