@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
| 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
|
Video Room{{ $video->subject }} · {{ $video->class_name }}
Room: {{ $video->subject }} ({{ $video->class_name }})
Host · {{ $video->isoDate() }} {{ $video->class_time }}
{{ $video->teacher }}
Live Now
|
||||||
| @include('online.partials.video-form', [ 'action' => route('online.videos.update', $video), 'method' => 'PUT', 'prefix' => 'video-'.$video->id, 'row' => $video, 'classCombos' => $classCombos, 'subjectMap' => $subjectMap, 'teachers' => $teachers, ]) | ||||||
| No video classes match your filters. | ||||||
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, ])