@if(!empty($courses->title) || $reviews->isNotEmpty())
{{$courses->title??''}}
@php
$totalReviews = $reviews->count();
$averageRating = $totalReviews > 0 ? round($reviews->avg('rating'), 1) : 0;
$fullStars = floor($averageRating);
$halfStar = ($averageRating - $fullStars) >= 0.5;
$emptyStars = 5 - ceil($averageRating);
@endphp
@if($totalReviews > 0)
@for ($i = 0; $i < $fullStars; $i++)
@endfor
@if ($halfStar)
@endif
@for ($i = 0; $i < $emptyStars; $i++)
@endfor
({{ number_format($totalReviews) }} reviews)
@endif
@endif
@if(!empty($courses->description))
Description
{!!$courses->description??''!!}
@endif
@if(!empty($courses->about_the_course))
About The Course
{!!$courses->about_the_course??''!!}
@endif
@if(!empty($courses->objectives_of_the_Course))
Objectives of the Course
{!!$courses->objectives_of_the_Course??''!!}
@endif
@if(!empty($courses->who_is_this_course_for))
Requirements
{!!$courses->who_is_this_course_for??''!!}
@endif
@if($instructers)
@endif
@if($reviews->isNotEmpty())
{{ $review->name ?? 'Anonymous' }}
{{ \Carbon\Carbon::parse($review->created_at)->format('F d, Y') }}{!! $review->description ?? '' !!}
@endif