@extends('layouts.app') @section('title', 'Timetable') @section('page-title', 'Timetable') @section('content')
{{ $error }}
@endforeach| Period | Time | @foreach($days as $day){{ ucfirst($day) }} | @endforeach
|---|---|---|
| {{ $period->name }} | {{ \Carbon\Carbon::parse($period->start_time)->format('h:i A') }} - {{ \Carbon\Carbon::parse($period->end_time)->format('h:i A') }} | @foreach($days as $day)
@if($period->is_break)
Break
@elseif(isset($grid[$period->id][$day]))
@php $entry = $grid[$period->id][$day]; @endphp
{{ $entry->subject?->name ?? '-' }} {{ $entry->teacher?->name ?? '' }} @if($entry->room){{ $entry->room }} @endif |
@endforeach
{{ auth()->user()->isAdmin() ? 'Select a class to view or create a timetable.' : 'Select a class to view the timetable.' }}