Dear Parent,
Your child {{ $application->student_name }} has been invited for interviews. Please select a suitable time slot from the list below:
@php $groupedSlots = collect($slots)->groupBy(function($slot) { $date = optional($slot->interviewRequest)->interview_date ?? 'Unknown Date'; $location = optional(optional($slot->interviewRequest)->location)->name ?? 'Unknown Location'; return $date . '|' . $location; // composite key for grouping }); @endphp @foreach ($groupedSlots as $key => $dailySlots) @php [$date, $locationName] = explode('|', $key); $isValidDate = \Carbon\Carbon::hasFormat($date, 'Y-m-d') && strtotime($date); @endphpLocation: {{ $locationName }}
| Interview Date | Start Time | End Time | Action |
|---|---|---|---|
| {{ optional($slot->interviewRequest)->interview_date ? \Carbon\Carbon::parse($slot->interviewRequest->interview_date)->format('l, F j, Y') : 'Unknown' }} | {{ \Carbon\Carbon::createFromTimeString($slot->start_time)->format('h:i A') }} | {{ \Carbon\Carbon::createFromTimeString($slot->end_time)->format('h:i A') }} | Book Slot |
If you do not respond, the slot may be filled by another applicant.
Thanks,
{{ config('app.name') }}