@extends('layouts.default') @section('title', 'Home') @section('content')
@if(Auth::check()) @if(Auth::user()->isSuperAdmin() || Auth::user()->isTenant() || Auth::user()->isAdmin())
@endif @endif

{{$home_content->hero_section_title ?? 'Law Community for Juniors and Veterans'}}

{!! $home_content->hero_section_p ?? 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit. Exercitation veniam consequat sunt nostrud amet.' !!}

@if(Auth::check()) Alumni Feeds @else Create account @endif
@if(Auth::check()) @if(Auth::user()->isSuperAdmin() || Auth::user()->isTenant() || Auth::user()->isAdmin())
@endif @endif

{{$home_content->course_section_title ?? 'Videos from the masterclasses'}}


{{$home_content->course_section_p ?? 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit. Exercitation veniam consequat sunt nostrud amet.'}}

@if(count($display_videos) > 0) @foreach ($display_videos as $course)
@if(isset($course->preview)) @endif @if(isset($course->audio)) {{$course->title}} @endif
@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
@endforeach @elseif(count($course_videos) > 0) @foreach ($course_videos as $course)
@if(isset($course->preview)) @endif @if(isset($course->audio)) {{$course->title}} @endif
@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
@endforeach @else
No courses found
@endif
@if(Auth::check()) @if(Auth::user()->isSuperAdmin() || Auth::user()->isTenant() || Auth::user()->isAdmin())
@endif @endif

{{$home_content->course_user_section_title ?? 'Top Continuing Legal Education Users'}}


{{$home_content->course_user_section_p ?? 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit. Exercitation veniam consequat sunt nostrud amet.'}}

@if(Auth::check()) @if(Auth::user()->isSuperAdmin() || Auth::user()->isTenant() || Auth::user()->isAdmin())
@endif @endif

{{$home_content->contributor_section_title ?? 'Top Contributors'}}


{{$home_content->contributor_section_p ?? 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit. Exercitation veniam consequat sunt nostrud amet.'}}

@forelse ($contributors as $contributor)
{{$contributor->first_name}}
{{$contributor->first_name}} {{$contributor->last_name}}

{{Str::words($contributor->bio, 10)}}

@empty
No Contributor found
@endforelse
@if(Auth::check()) @if(Auth::user()->isSuperAdmin() || Auth::user()->isTenant() || Auth::user()->isAdmin())
@endif @endif

{{$home_content->mentor_section_title ?? 'Top Mentors'}}


{{$home_content->mentor_section_p ?? 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit. Exercitation veniam consequat sunt nostrud amet.'}}

@forelse ($mentors as $mentor)
@empty
No Mentor found
@endforelse
@if(Auth::check()) @if(Auth::user()->isSuperAdmin() || Auth::user()->isTenant() || Auth::user()->isAdmin())
@endif @endif

{{$home_content->qa_section_title ?? 'Questions & Answers'}}


{{$home_content->qa_section_p ?? 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit. Exercitation veniam consequat sunt nostrud amet.'}}

@forelse ($questions as $question)
@empty
No Question found
@endforelse
@include('elements.home-hero') @include('elements.home-course') @include('elements.home-course-user') @include('elements.home-contributor') @include('elements.home-mentor') @include('elements.home-qa') @endsection