@php $has_today_class = false; @endphp
@foreach($courses as $item)
@php
$today_classes = App\Models\Classes::where('date', Carbon\Carbon::now()->format('Y-m-d'))->where('course_id', $item->course_id)->get();
@endphp
@foreach($today_classes as $class_item)
@php $has_today_class = true; @endphp
{{ Carbon\Carbon::createFromFormat('H:i', $class_item->start_time)->format('g:i A') }} - {{ Carbon\Carbon::createFromFormat('H:i', $class_item->end_time)->format('g:i A') }}
|
{{ $class_item->subject->name ?? '' }}
@endforeach
@endforeach
@if(!$has_today_class)
আজ কোনো ক্লাস রুটিন নেই
@endif