@extends('layouts.dashboard') @section('title', __('Live Classes')) @section('page_title', __('Live Classes')) @section('content') @if(auth()->user()->calendarConnections()->where('provider', 'google')->exists() || auth()->user()->calendarConnections()->where('provider', 'microsoft')->exists())
{{ __('Connected calendars can be synchronized with your upcoming classes.') }}
@foreach(['google', 'microsoft'] as $calendarProvider) @if(auth()->user()->calendarConnections()->where('provider', $calendarProvider)->exists())
@csrf
@endif @endforeach
@endif @if(config('calendar.google.client_id') && config('calendar.google.client_secret') || config('calendar.microsoft.client_id') && config('calendar.microsoft.client_secret'))
@foreach(['google', 'microsoft'] as $calendarProvider) @if(config("calendar.{$calendarProvider}.client_id") && config("calendar.{$calendarProvider}.client_secret") && ! auth()->user()->calendarConnections()->where('provider', $calendarProvider)->exists()) {{ __('Connect') }} {{ ucfirst($calendarProvider) }} {{ __('Calendar') }} @endif @endforeach
@endif @include('partials.how-it-works', ['key' => 'liveclass.student'])
{{ __('Upcoming Live Classes') }}
@forelse($classes as $class)
{{ ucfirst(str_replace('_', ' ', $class->provider)) }} {{ status_label($class->status) }}
{{ $class->title }}

{{ $class->course->title ?? '' }}

{{ optional($class->start_time)->format('d M Y, h:i A') }}

isBuiltIn()) target="_blank" @endunless class="mt-auto">@csrf
@php($calLoc = $class->isBuiltIn() ? route('liveclass.room', $class) : ($class->join_url ?: '')) @php($calGoogle = \App\Support\CalendarLink::googleUrl($class->title, $class->start_time, $class->end_time, (string) ($class->course->title ?? ''), $calLoc)) @php($calOutlook = \App\Support\CalendarLink::outlookUrl($class->title, $class->start_time, $class->end_time, (string) ($class->course->title ?? ''), $calLoc))
@if($calGoogle)@endif @if($calOutlook)@endif
@empty
{{ __('No upcoming live classes for your courses.') }}
@endforelse
@endsection