@php $type = $type ?? 'welcome'; $meta = [ 'welcome' => ['heading' => 'Welcome to the Parent Portal', 'intro' => 'Your Parent Portal account has been created. Use the link below to set your password.', 'cta' => 'Set Your Password'], 'reset' => ['heading' => 'Password Reset Request', 'intro' => 'We received a request to reset your password. Use the link below to create a new password.', 'cta' => 'Reset Password'], 'credentials' => ['heading' => 'Your Parent Portal Login', 'intro' => 'Here are your Parent Portal login details. You can sign in right away with the temporary password below, or use the link to choose a password now.', 'cta' => 'Set Your Password'], ]; $m = $meta[$type] ?? $meta['welcome']; $rows = []; if (!empty($username)) $rows[] = ['label' => 'Username', 'value' => $username]; if (!empty($tempPassword)) $rows[] = ['label' => 'Temp password', 'value' => $tempPassword]; if (!empty($loginUrl)) $rows[] = ['label' => 'Login', 'value' => $loginUrl]; $note = $type === 'credentials' ? 'For your security, please change the temporary password after your first login. The link expires in 1 hour.' : 'This link will expire in 1 hour. If it has expired, request a new one from your administrator.'; @endphp Hi {{ $recipientName }}, @include('emails.plain.generic', [ 'heading' => $m['heading'], 'intro' => $m['intro'], 'rows' => $rows, 'ctaLabel' => $m['cta'], 'ctaUrl' => $resetUrl ?? null, 'note' => $note, ])