@extends('layouts.app') @section('content')

Aulas Online

Lives e vídeos de apoio cadastrados.

Nova aula
@if (session('success'))
{{ session('success') }}
@endif
@forelse ($classes as $class) @php $now = now(); $isLive = $class->type === 'live' && $class->starts_at && $class->starts_at <= $now && (!$class->expires_at || $class->expires_at >= $now); $isExpired = $class->expires_at && $class->expires_at < $now; $statusLabel = $isLive ? 'Ao vivo agora' : ($isExpired ? 'Expirada' : 'Disponível'); $statusClass = $isLive ? 'bg-success-50 text-success-700' : ($isExpired ? 'bg-gray-100 text-gray-600' : 'bg-blue-light-50 text-blue-light-700'); @endphp @empty @endforelse
Título Tipo Status Turma Disciplina Início Expira Ações
{{ $class->title }} {{ $class->type === 'live' ? 'Live' : 'Gravada' }} {{ $statusLabel }} {{ $class->classroom?->name ?? '-' }} {{ $class->discipline?->name ?? '-' }} {{ $class->starts_at?->format('d/m/Y H:i') ?? '-' }} {{ $class->expires_at?->format('d/m/Y H:i') ?? '-' }}
Editar
@csrf @method('DELETE')
Nenhuma aula cadastrada.
{{ $classes->links() }}
@endsection