afterCommit(); } public function via(object $notifiable): array { return ['mail']; } public function toMail(object $notifiable): MailMessage { $locale = $this->tenant->user?->preferred_locale ?? app()->getLocale(); $formattedDate = $this->plannedDeletion->copy()->locale($locale)->translatedFormat('d. F Y'); $subject = __('profile.retention.warning_subject', [], $locale); return (new MailMessage) ->subject($subject) ->view('emails.notifications.basic', [ 'title' => $subject, 'preheader' => __('profile.retention.line1', ['name' => $this->tenant->name], $locale), 'heroTitle' => $subject, 'lines' => [ __('profile.retention.line1', ['name' => $this->tenant->name], $locale), __('profile.retention.line2', ['date' => $formattedDate], $locale), __('profile.retention.line3', [], $locale), ], 'cta' => [ [ 'label' => __('profile.retention.action', [], $locale), 'url' => url('/login'), ], ], ]); } }