@extends('frontend-rtl.layouts.app'.config('theme_layout')) @section('title', ($course->meta_title) ? $course->meta_title : app_name() ) @section('meta_description', $course->meta_description) @section('meta_keywords', $course->meta_keywords) @push('after-styles') @endpush @section('content') {{$course->title}} @if(session()->has('success')) × {{session('success')}} @endif @if($course->course_image != "") @endif {{$course->title}} @if($course->trending == 1) @lang('labels.frontend.badges.trending') @endif @if($course->free == 1) @lang('labels.backend.courses.fields.free') @endif {!! $course->description !!} @if($course->mediaVideo && $course->mediavideo->count() > 0) @if($course->mediavideo != "") @if($course->mediavideo->type == 'youtube') @elseif($course->mediavideo->type == 'vimeo') @elseif($course->mediavideo->type == 'upload') @elseif($course->mediavideo->type == 'embed') {!! $course->mediavideo->url !!} @endif @endif @endif @if(count($lessons) > 0) @lang('labels.frontend.course.course_timeline') @endif @if(count($lessons) > 0) @php $count = 0; @endphp @foreach($lessons as $key=> $lesson) @if($lesson->model && $lesson->model->published == 1) @php $count++ @endphp @if(auth()->check()) @if(in_array($lesson->model->id,$completed_lessons)) @lang('labels.frontend.course.completed') @endif @endif {{ sprintf("%02d", $count)}} {{$lesson->model->title}} @if($lesson->model_type == 'App\Models\Test') @lang('labels.frontend.course.test') @endif @if($lesson->model_type == 'App\Models\Test') {{ mb_substr($lesson->model->description,0,20).'...'}} @else {{$lesson->model->short_text}} @endif @if(auth()->check()) @if(in_array($lesson->model->id,$completed_lessons)) @lang('labels.frontend.course.go') > @endif @endif @endif @endforeach @endif @lang('labels.frontend.course.course_reviews') @lang('labels.frontend.course.average_rating') {{$course_rating}} @for($r=1; $r<=$course_rating; $r++) @endfor {{$total_ratings}} @lang('labels.frontend.course.ratings') @lang('labels.frontend.course.details') @for($r=5; $r>=1; $r--) {{$r}} @lang('labels.frontend.course.stars') {{$course->reviews()->where('rating','=',$r)->get()->count()}} @endfor @if(count($course->reviews) > 0) @foreach($course->reviews as $item) @lang('labels.frontend.course.by'): {{$item->user->full_name}} @for($i=1; $i<=(int)$item->rating; $i++) @endfor @if(auth()->check() && ($item->user_id == auth()->user()->id)) @lang('labels.general.edit') @lang('labels.general.delete') @endif {{$item->created_at->diffforhumans()}} {{$item->content}} @endforeach @else @lang('labels.frontend.course.no_reviews_yet') @endif @if ($purchased_course) @if(isset($review) || ($is_reviewed == false)) @lang('labels.frontend.course.add_reviews') @lang('labels.frontend.course.your_rating'): @php if(isset($review)){ $route = route('courses.review.update',['id'=>$review->id]); }else{ $route = route('courses.review',['course'=>$course->id]); } @endphp @csrf @lang('labels.frontend.course.message') @if(isset($review)){{$review->content}} @endif {{ $errors->first('review', ':message') }} @lang('labels.frontend.course.add_review_now') @endif @endif @if($course->bundles && (count($course->bundles) > 0)) @lang('labels.frontend.course.available_in_bundles') @foreach($course->bundles as $bundle) course_image != "") style="background-image: url('{{asset('storage/uploads/'.$course->course_image)}}')" @endif> @if($bundle->trending == 1) @lang('labels.frontend.badges.trending') @endif @if($bundle->free == 1) @lang('labels.backend.courses.fields.free') @endif @for($i=1; $i<=(int)$bundle->rating; $i++) @endfor @lang('labels.frontend.course.bundle_detail') {{$bundle->title}} {{$bundle->category->name}} {{ $bundle->students()->count() }} @lang('labels.frontend.course.students') {{ $bundle->courses()->count() }} @if($bundle->courses()->count() > 1 ) @lang('labels.frontend.course.courses') @else @lang('labels.frontend.course.course') @endif @endforeach @endif @if (!$purchased_course) @if($course->free == 1) {{trans('labels.backend.courses.fields.free')}} @else @lang('labels.frontend.course.price') {{$appCurrency['symbol'].' '.$course->price}} @endif @if(auth()->check() && (auth()->user()->hasRole('student')) && (Cart::session(auth()->user()->id)->get( $course->id))) @lang('labels.frontend.course.added_to_cart') @elseif(!auth()->check()) @if($course->free == 1) @lang('labels.frontend.course.get_now') @else @lang('labels.frontend.course.buy_now') @lang('labels.frontend.course.add_to_cart') @endif @elseif(auth()->check() && (auth()->user()->hasRole('student'))) @if($course->free == 1) @csrf @lang('labels.frontend.course.get_now') @else @csrf @lang('labels.frontend.course.buy_now') @csrf @lang('labels.frontend.course.add_to_cart') @endif @else @lang('labels.frontend.course.buy_note') @endif @else @if($continue_course) @lang('labels.frontend.course.continue_course') @endif @endif @for($i=1; $i<=(int)$course->rating; $i++) @endfor {{ $course->students()->count() }} @lang('labels.frontend.course.enrolled') @lang('labels.frontend.course.chapters') {{$course->chapterCount()}} {{--Language English--}} @lang('labels.frontend.course.category') {{$course->category->name}} @lang('labels.frontend.course.author') @foreach($course->teachers as $key=>$teacher) @php $key++ @endphp {{$teacher->full_name}}@if($key < count($course->teachers )), @endif @endforeach @if($recent_news->count() > 0) @lang('labels.frontend.course.recent_news') @foreach($recent_news as $item) @if($item->image != "") @endif {{$item->created_at->format('d M Y')}} {{$item->title}} @endforeach @lang('labels.frontend.course.view_all_news') @endif @if($global_featured_course != "") @lang('labels.frontend.course.featured_course') course_image != "") style="background-image: url({{asset('storage/uploads/'.$global_featured_course->course_image)}})" @endif> @if($global_featured_course->trending == 1) @lang('labels.frontend.badges.trending') @endif @if($global_featured_course->free == 1) @lang('labels.backend.courses.fields.free') @endif {{$global_featured_course->title}} {{$global_featured_course->category->name}} {{ $global_featured_course->students()->count() }} @endif @endsection @push('after-scripts') @endpush
{!! $course->description !!}
{{$item->content}}
@for($i=1; $i<=(int)$item->rating; $i++)
@endfor
@if(auth()->check() && ($item->user_id == auth()->user()->id)){{$item->content}}