@extends('layout.app') @section('title', __('home.lecture_page')) @section('content')
@if (session('success')) @endif @if (session('error')) @endif

{{ $lecture->title }} @if($lecture->max_students == 1) {{ __('home.private') }} @endif

{{--

{{ $lecture->description }}

--}}

{{ __('home.lecture_details') }}

{{ $lecture->description }}

{{ __('home.lesson_objectives') }}

{!! $lecture->what_learn !!} @if(auth()->check() && auth()->user()->student && auth()->user()->student->hasPaidForLecture($lecture->id)) @if($lecture->files->isNotEmpty())

{{ __('home.lecture_files') }}

@foreach($lecture->files as $file) {{ $file->original_name }} @endforeach
@foreach($lecture->files as $file) @endforeach @endif @endif @if(auth()->check() && auth()->user()->student && auth()->user()->student->hasPaidForLecture($lecture->id))
{{ __('home.zoom_link') }} ({{ __('home.lecture_will_start_at') }} {{ \Carbon\Carbon::parse($lecture->start_time)->format('l, F j, Y h:i A') }})
@php $endTime = \Carbon\Carbon::parse($lecture->start_time)->addMinutes($lecture->duration); @endphp @if (\Carbon\Carbon::parse($lecture->start_time)->isFuture()) @if ($lecture->lecture_zoom) {!! nl2br(preg_replace('/(https?:\/\/[^\s]+)/', '$1', e($lecture->lecture_zoom))) !!} @else @endif @elseif (\Carbon\Carbon::now()->greaterThanOrEqualTo($endTime)) @if ($lecture->lecture_video)
{{ __('home.click_to_watch_video') }}
@else @endif @else @endif @else @endif
@endsection