@php /** * Bespoke dunning hero — shared across DunningEmail1/2/3. The Mailable * passes the urgency level and copy variants; the template composes them * with consistent design language. Stripe-receipt feel. * * @var string $userName * @var string $appName * @var string $updateUrl * @var string $invoiceId Mono meta line at the bottom. * @var string $urgency 'first' | 'second' | 'final' * @var string $heading H1 line (HTML allowed). * @var string $body Lead paragraph (HTML allowed). * @var string $explanation Secondary paragraph (HTML allowed). * @var string $ctaLabel * @var string $ctaColor 'primary' | 'error' */ $eyebrowMap = [ 'first' => 'Payment failed', 'second' => 'Account at risk', 'final' => 'Final notice', ]; $eyebrow = $eyebrowMap[$urgency ?? 'first'] ?? 'Billing notice'; $invoiceId = $invoiceId ?? ''; @endphp

{!! $explanation !!}

@isset($atRiskItems) @if (! empty($atRiskItems))

What's at risk

@foreach ($atRiskItems as $risk)

·  {{ $risk }}

@endforeach
@endif @endisset {{ $ctaLabel }}

If you believe this is an error or you'd like to discuss your account, reply to this email and we'll sort it out.

@if ($invoiceId !== '')

Invoice ref · {{ $invoiceId }}

@endif