{{ $course_details->title }}
{{ ellipsis($course_details->short_description, 160) }}
@if ($total > 0) {{ number_format(round($average_rating), 1) }} @for ($i = 0; $i < $average_rating; $i++) @endfor @else 0 @endif
 }})
 }})
 }})
 }})
@extends('layouts.default')
@push('title', get_phrase('Course Details'))
@push('meta')@endpush
@push('css')@endpush
@section('content')
@php
$instructor_review = App\Models\Instructor_review::where('instructor_id', get_course_creator_id($course_details->id)->id)
->orderBy('id', 'DESC')
->get();
$review = App\Models\Review::where('course_id', $course_details->id)
->orderBy('id', 'DESC')
->get();
$total = $review->count();
$rating = array_sum(array_column($review->toArray(), 'rating'));
$average_rating = 0;
if ($total != 0) {
$average_rating = $rating / $total;
}
@endphp
{{ ellipsis($course_details->short_description, 160) }}
@if ($total > 0)
{{ number_format(round($average_rating), 1) }}
@for ($i = 0; $i < $average_rating; $i++)
@endfor
@else
0
@endif
{{ $course_details->title }}
{{ ucfirst($course_details->language) }}
{{ get_phrase('Certificate Course') }}
{{ total_enroll($course_details->id) }} {{ get_phrase('Students') }}
{{ total_durations($course_details->id) }}