@extends('layouts.landing') @section('title') {{$course->title}} - Elearning @endsection @section('content')
@if($module) @endif
@if(isset($course->preview)) @endif @if(isset($course->audio)) @endif

{{$course->title}}

@if($viewed_course_count < 2) {{number_format($viewed_course_count)}} view @else {{number_format($viewed_course_count)}} views @endif   |   , {{$course->created_at->diffForHumans()}}

@if(count($likes) > 0) @if($user_has_liked) @elseif($user_has_unliked) @elseif($user_has_not_liked < 1) @else @endif @else @endif

@if($like_count > 0 && $like_count < 2) {{$like_count}} like @elseif($like_count > 1) {{$like_count}} likes @else {{$like_count}} like @endif

{{$course->description}}

{{--
Instructor
{{$instructor->first_name}} {{$instructor->last_name}}
{{$instructor->area_of_specialization}}
--}}
@forelse ($reviews as $review)
@php $user = App\Models\User::where('id', $review->user_id)->first(); @endphp
{{$user->first_name}} {{$user->last_name}}

{{$user->area_of_specialization}}

@if($review->rating) {{getRating($review->rating)}} @endif

{{$review->review}}

@empty

There are no reviews

@endforelse
@if(Auth::user()->isSuperAdmin() || Auth::user()->isTenant() || Auth::user()->isAdmin()) @endif
{{$course->title}}
@if(count($modules) > 0) @foreach($modules as $module) @php $first_module = App\Models\Module::where('course_id', $course->id)->orderBy('created_at', 'ASC')->first(); @endphp @endforeach @else
No modules created
@endif @if($test) @if($test->is_active == '1') @endif @endif
@include('elements.course-likes') @include('elements.add-review') @endsection