@extends('admin.layouts.master') @section('title') Starter Page @endsection @section('css') @endsection @section('content')

Weekly Timetable per Teacher

@foreach($teachers as $teacher)
{{ $teacher->name }}
@foreach ($periods as $period) @endforeach @foreach($days as $day) @foreach($periods as $period) @php $entry = optional($timetables[$teacher->id] ?? collect()) ->where('day_of_week', $day) ->where('period', $period) ->first(); @endphp @endforeach @endforeach
Day{{ 7 + $period }}:00
{{ $day }} @if($entry)
{{ $entry->subject->name }}
{{ $entry->section->level->name ?? '' }} - {{ $entry->section->name ?? '' }}
{{ $entry->classroom->name ?? '' }} @else @endif
@endforeach
@endsection