@if($course->duration > 1)
{{$course->duration}} mins eCLE Value
@elseif($course->duration < 2)
{{$course->duration}} min eCLE Value
@elseif($course->duration >= 60 && $course->duration < 120)
{{$course->duration / 60}} hr eCLE Value
@elseif($course->duration >= 120)
{{$course->duration / 60}} hrs eCLE Value
@endif
{{Str::words($course->description, 10)}}
@php
$review_count = App\Models\CourseReview::where('course_id', $course->id)->count();
$viewed_count = App\Models\ViewedCourse::where('course_id', $course->id)->count();
@endphp
@if($review_count > 0)
{{number_format($review_count)}}
@endif
@if($viewed_count > 9999)
{{substr($viewed_count, 0, -3)}}K views
@elseif($viewed_count > 99999)
{{substr($viewed_count, 0, -3)}}K views
@elseif($viewed_count > 999999)
{{substr($viewed_count, 0, -4)}}M views
@elseif($viewed_count < 2)
{{number_format($viewed_count)}} view
@else
{{number_format($viewed_count)}} views
@endif