{{ __('Schedule & Appointments') }}

Upcoming Events

@foreach($appointments->where('start_time', '>=', now())->take(3) as $apt)

{{ $apt->start_time->format('M d') }} • {{ $apt->start_time->format('H:i') }}

{{ $apt->title }}

@csrf @method('DELETE')
@endforeach @foreach($courtDates->where('court_date', '>=', now())->take(3) as $hearing)

Court • {{ $hearing->court_date->format('M d @ H:i') }}

{{ $hearing->case_number }}

@endforeach @if($appointments->isEmpty() && $courtDates->isEmpty())

No upcoming events.

@endif

{{ now()->format('F Y') }}

Appointment Court Date
@foreach(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] as $day)
{{ $day }}
@endforeach @php $daysInMonth = now()->daysInMonth; $firstDayOfWeek = now()->startOfMonth()->dayOfWeek; @endphp @for($i = 0; $i < $firstDayOfWeek; $i++)
@endfor @for($day = 1; $day <= $daysInMonth; $day++) @php $currentDate = now()->startOfMonth()->addDays($day - 1)->format('Y-m-d'); // Filter Appointments $dayAppointments = $appointments->filter(function($apt) use ($currentDate) { return $apt->start_time->format('Y-m-d') === $currentDate; }); // Filter Court Dates $dayCourtDates = $courtDates->filter(function($case) use ($currentDate) { return $case->court_date->format('Y-m-d') === $currentDate; }); @endphp
{{ $day }} @foreach($dayCourtDates as $hearing) {{ $hearing->court_date->format('H:i') }} {{ $hearing->case_number }} @endforeach @foreach($dayAppointments as $apt)
{{ $apt->start_time->format('H:i') }} {{ $apt->title }}
@endforeach
@endfor