@foreach ($days as $dayKey => $dayName) @php $exist_day = $setup_routine->where('class_day', $dayKey)->first(); if (!$exist_day) { continue; } @endphp {{ $dayName }} @foreach ($routine_periods as $period) @php $periodData = $setup_routine ->where('class_day', $dayKey) ->where('routine_period_id', $period->id) ->first(); @endphp @if ($periodData) @php $startTime = \Carbon\Carbon::parse($periodData->start_time)->format('h:i A'); $endTime = \Carbon\Carbon::parse($periodData->end_time)->format('h:i A'); @endphp {{ $periodData->rel_to_routineTypeId->routine_type }}
{{ optional($periodData->rel_to_subject)->subject ?? 'No Subject Available' }}
{{ $startTime }} - {{ $endTime }}
Class Room : {{ $periodData->rel_to_classRoom->class_room_name }} @if($action_hide==false || $action_hide == 'false')
@endif @else N/A @endif @endforeach @if($action_hide==false || $action_hide == 'false') {{-- @method('DELETE') --}} {{-- --}} @endif @endforeach