@php $type = $type ?? 'welcome'; $meta = [ 'welcome' => ['heading' => 'Welcome to the Parent Portal', 'intro' => 'Your Parent Portal account has been created. Click the button below to set your password and start using the portal.', 'cta' => 'Set Your Password'], 'reset' => ['heading' => 'Password Reset Request', 'intro' => 'We received a request to reset your password. Click the button 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, then set your own password when prompted — or use the button to choose a password now.', 'cta' => 'Set Your Password'], ]; $m = $meta[$type] ?? $meta['welcome']; $rows = []; if (!empty($username)) $rows[] = ['label' => 'Username', 'value' => e($username)]; if (!empty($tempPassword)) $rows[] = ['label' => 'Temp password', 'value' => '' . e($tempPassword) . '']; if (!empty($loginUrl)) $rows[] = ['label' => 'Login', 'value' => '' . e($loginUrl) . '']; $preheader = $type === 'reset' ? 'Reset your ' . config('company.short') . ' password.' : 'Welcome to the ' . config('company.short') . ' Parent Portal.'; $note = $type === 'credentials' ? 'For your security, please change the temporary password after your first login. The set-password link expires in 1 hour.' : 'This link will expire in 1 hour. If it has expired, please request a new one from your school administrator.'; @endphp @extends('emails.layouts.stepup', ['preheader' => $preheader, 'heading' => $m['heading'], 'footerNote' => $note]) @section('body')
Hi {{ $recipientName }},
{{ $m['intro'] }}
@endsection @if(!empty($rows)) @section('summary') @include('emails.components.summary-table', ['title' => 'Account Details', 'rows' => $rows]) @endsection @endif @if(!empty($resetUrl)) @section('cta') @include('emails.components.button', ['label' => $m['cta'], 'url' => $resetUrl]) @endsection @endif