@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')
@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
@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)) @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)) @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 {{ $errors->first('review', ':message') }}
@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
{{$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
@endsection @push('after-scripts') @endpush