@extends('layouts.app') @section('title', 'Video Classes') @section('content') @php $accent = fn (string $s) => match ($s) { 'Live' => 'bg-emerald-500/15 text-emerald-700', 'Completed' => 'bg-sky-500/15 text-sky-700', default => 'bg-slate-500/15 text-slate-700', }; // Source sorting: click the active header to flip; a new header starts ascending. $toggle = function (string $key) use ($filters) { $current = $filters['sort']; $dir = $filters['dir']; if ($current === $key) { return route('online.videos', array_merge($filters, ['dir' => $dir === 'asc' ? 'desc' : 'asc'])); } return route('online.videos', array_merge($filters, ['sort' => $key, 'dir' => 'asc'])); }; $arrow = fn (string $key) => $filters['sort'] === $key ? ($filters['dir'] === 'asc' ? '↑' : '↓') : '↕'; @endphp

Schedule and run live video lessons for online classes

Video Classes

@include('partials.flashes')
@foreach ([ ['label' => 'Upcoming Classes', 'value' => $stats['Upcoming Classes']], ['label' => 'Live Now', 'value' => $stats['Live Now']], ['label' => 'Total Classes', 'value' => $stats['Total Classes']], ] as $stat)
{{ $stat['value'] }} {{ $stat['label'] }}
@endforeach
Clear
@forelse ($rows as $video) @if ($video->status === 'Live') @endif @empty @endforelse
Class {{ $arrow('class_name') }} Subject {{ $arrow('subject') }} Teacher Date & Time {{ $arrow('date') }} Duration Status Actions
{{ $video->class_name }} {{ $video->subject }} {{ $video->teacher }}
{{ $video->isoDate() }} {{ $video->class_time }}
{{ $video->duration }} min @if ($video->status === 'Live') Live Now @else {{ $video->status }} @endif
@if ($video->status === 'Live') @elseif ($video->status === 'Scheduled') Start @endif
@csrf @method('DELETE')
No video classes match your filters.
{{ $rows->total() }} of {{ $stats['Total Classes'] }} video classes
any()) open @endif> Schedule Video Class

Fields marked * are required.

@include('online.partials.video-form', [ 'action' => route('online.videos.store'), 'method' => 'POST', 'prefix' => 'video-new', 'row' => null, 'classCombos' => $classCombos, 'subjectMap' => $subjectMap, 'teachers' => $teachers, ])
@endsection @push('scripts') @endpush