*/ public function via(object $notifiable): array { return ['mail']; } public function toMail(User $notifiable): MailMessage { $date = $this->certificate->expires_at->toFormattedDateString(); return (new MailMessage) ->subject(__('Certificate expiring soon: :title', ['title' => $this->certificate->title])) ->greeting(__('Hello :name,', ['name' => $notifiable->name])) ->line(__('Your certificate ":title" will expire on :date.', [ 'title' => $this->certificate->title, 'date' => $date, ])) ->action(__('View your certificates'), route('certificates.index')) ->line(__('Please renew it in good time to stay compliant.')); } }