@extends(getTemplate() .'.panel.layouts.panel_layout') @push('styles_top') @endpush @section('content')

{{ trans('panel.favorite_live_classes') }}

@if(!empty($favorites) and !$favorites->isEmpty()) @foreach($favorites as $favorite) @php $favItem = !empty($favorite->upcoming_course_id) ? $favorite->upcomingCourse : ((!empty($favorite->webinar_id)) ? $favorite->webinar : $favorite->bundle); @endphp
@if(!empty($favorite->webinar_id) and $favItem->type == 'webinar')
@endif
@if(empty($favorite->upcoming_course_id)) @include(getTemplate() . '.includes.webinar.rate',['rate' => $favItem->getRate()]) @endif
@if(empty($favorite->upcoming_course_id) and $favItem->bestTicket() < $favItem->price) {{ handlePrice($favItem->bestTicket(), true, true, false, null, true) }} {{ handlePrice($favItem->price, true, true, false, null, true) }} @else {{ handlePrice($favItem->price, true, true, false, null, true) }} @endif
{{ trans('public.item_id') }}: {{ $favItem->id }}
{{ trans('public.category') }}: {{ !empty($favItem->category_id) ? $favItem->category->title : '' }}
{{ trans('public.duration') }}: {{ convertMinutesToHourAndMinute($favItem->duration) }} {{ trans('home.hours') }}
@if(!empty($favorite->webinar_id) and $favItem->isWebinar()) {{ trans('public.start_date') }}: @else {{ trans('public.created_at') }}: @endif {{ dateTimeFormat(!empty($favItem->start_date) ? $favItem->start_date : $favItem->created_at,'j M Y') }}
{{ trans('public.instructor') }}: {{ $favItem->teacher->full_name }}
@endforeach @else @include(getTemplate() . '.includes.no-result',[ 'file_name' => 'student.png', 'title' => trans('panel.no_result_favorites'), 'hint' => trans('panel.no_result_favorites_hint') , ]) @endif
{{ $favorites->appends(request()->input())->links('vendor.pagination.panel') }}
@endsection