Converted all notification emails to the branded layout by routing them through a shared Blade template and swapping
the MailMessage builders to use view(). This keeps the existing copy/labels but aligns the look with resources/views/ emails/partials/layout.blade.php. I also switched the customer add‑on receipt notification to reuse the existing branded view and added missing translations for the upload pipeline alert.
This commit is contained in:
@@ -25,19 +25,33 @@ class TenantPackageExpiredNotification extends Notification implements ShouldQue
|
||||
$package = $this->tenantPackage->package;
|
||||
|
||||
$url = url('/tenant/billing');
|
||||
$subject = __('emails.package_limits.package_expired.subject', [
|
||||
'package' => $package?->getNameForLocale() ?? $package?->name ?? __('emails.package_limits.package_fallback'),
|
||||
]);
|
||||
$greeting = __('emails.package_limits.package_expired.greeting', [
|
||||
'name' => $tenant?->name ?? __('emails.package_limits.team_fallback'),
|
||||
]);
|
||||
|
||||
return (new MailMessage)
|
||||
->subject(__('emails.package_limits.package_expired.subject', [
|
||||
'package' => $package?->getNameForLocale() ?? $package?->name ?? __('emails.package_limits.package_fallback'),
|
||||
]))
|
||||
->greeting(__('emails.package_limits.package_expired.greeting', [
|
||||
'name' => $tenant?->name ?? __('emails.package_limits.team_fallback'),
|
||||
]))
|
||||
->line(__('emails.package_limits.package_expired.body', [
|
||||
'package' => $package?->getNameForLocale() ?? $package?->name ?? __('emails.package_limits.package_fallback'),
|
||||
'date' => optional($this->tenantPackage->expires_at)->toFormattedDateString(),
|
||||
]))
|
||||
->action(__('emails.package_limits.package_expired.action'), $url)
|
||||
->line(__('emails.package_limits.footer'));
|
||||
->subject($subject)
|
||||
->view('emails.notifications.basic', [
|
||||
'title' => $subject,
|
||||
'preheader' => $greeting,
|
||||
'heroTitle' => $greeting,
|
||||
'heroSubtitle' => $subject,
|
||||
'lines' => [
|
||||
__('emails.package_limits.package_expired.body', [
|
||||
'package' => $package?->getNameForLocale() ?? $package?->name ?? __('emails.package_limits.package_fallback'),
|
||||
'date' => optional($this->tenantPackage->expires_at)->toFormattedDateString(),
|
||||
]),
|
||||
],
|
||||
'cta' => [
|
||||
[
|
||||
'label' => __('emails.package_limits.package_expired.action'),
|
||||
'url' => $url,
|
||||
],
|
||||
],
|
||||
'footer' => __('emails.package_limits.footer'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user