@php $resolvedTitle = $title ?? 'Notification'; $resolvedSchool = $schoolName ?? 'Classic LMS'; $resolvedInitials = $schoolInitials ?? strtoupper(substr(preg_replace('/[^a-zA-Z0-9]/', '', $resolvedSchool), 0, 2) ?: 'CL'); $resolvedCategory = $category ?? 'Portal Notification'; $resolvedTheme = $theme ?? [ 'headerBg' => '#062e24', 'headerGradient' => 'linear-gradient(135deg, #0f172a 0%, #064e3b 58%, #047857 100%)', 'stripGradient' => 'linear-gradient(90deg, #10b981 0%, #047857 100%)', 'accentHex' => '#059669', 'accentSoftBg' => '#ecfdf5', 'accentSoftBorder' => '#a7f3d0', 'accentSoftText' => '#047857', 'tagline' => 'Institutional Management & Learning Portal', ]; $resolvedParagraphs = $bodyParagraphs ?? []; if (empty($resolvedParagraphs) && !empty($bodyContent)) { $resolvedParagraphs = preg_split("/\r?\n\s*\r?\n/", trim((string) $bodyContent)) ?: []; $resolvedParagraphs = array_values(array_filter(array_map('trim', $resolvedParagraphs), fn ($p) => $p !== '')); } $resolvedPreheader = $preheader ?? ($resolvedTitle . ' - ' . $resolvedSchool); $contactParts = array_values(array_filter([ !empty($schoolEmail) ? (string) $schoolEmail : null, !empty($schoolPhone) ? (string) $schoolPhone : null, ])); @endphp {{ $subject ?? $resolvedTitle }}
{{ $resolvedPreheader }}