@php $rows = [ ['label' => 'Student', 'value' => $studentName ?? '-'], ['label' => 'Status', 'value' => $statusLabel ?? '-'], ]; if (!empty($subjectName)) $rows[] = ['label' => 'Subject', 'value' => $subjectName]; if (!empty($dateFormatted)) $rows[] = ['label' => 'Date', 'value' => $dateFormatted]; if (!empty($timeFormatted)) $rows[] = ['label' => 'Time', 'value' => $timeFormatted]; if (!empty($lateMinutes)) $rows[] = ['label' => 'Late by', 'value' => $lateMinutes . ' min']; @endphp Dear {{ $parentName ?? 'Parent' }}, @include('emails.plain.generic', [ 'heading' => $notifTitle ?? 'Attendance Notification', 'intro' => ($studentName ?? 'Your child') . ' was marked as ' . ($statusLabel ?? '') . (!empty($subjectName) ? ' for ' . $subjectName : '') . ' on ' . ($dateFormatted ?? '') . (!empty($timeFormatted) ? ' (' . $timeFormatted . ')' : '') . '.', 'rows' => $rows, 'note' => 'If you have any questions, please contact the academy.', ])