@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $navGroups = \App\Support\Navigation\StudentNav::groups('timetable'); $daysPresent = $slots->pluck('day_of_week')->unique()->sort()->values(); $timeBands = $slots->pluck('start_time')->map(fn ($t) => $t->format('H:i'))->unique()->sort()->values(); @endphp @if($slots->isEmpty() || $entries->isEmpty())
No timetable published for your section yet.
@else
@foreach($daysPresent as $day) @endforeach @foreach($timeBands as $band) @foreach($daysPresent as $day) @php $slot = $slots->first(fn($s) => $s->day_of_week === $day && $s->start_time->format('H:i') === $band); @endphp @endforeach @endforeach
Time{{ $days[$day] }}
{{ $band }} @if($slot) @foreach(($entries[$slot->day_of_week.'-'.$slot->id] ?? []) as $entry)

{{ $entry->courseOffering->subject->name }}

{{ $entry->courseOffering->teacher?->name ?? '—' }}

@endforeach @else — @endif
@endif