From 185e47522d2e2d1ce49cf788ca282ab32133211b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 30 Aug 2021 19:30:25 +1000 Subject: [PATCH] Add correct translations for emails --- app/Listeners/SendVerificationNotification.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Listeners/SendVerificationNotification.php b/app/Listeners/SendVerificationNotification.php index 99e095b10d60..cec4f916b0cc 100644 --- a/app/Listeners/SendVerificationNotification.php +++ b/app/Listeners/SendVerificationNotification.php @@ -24,6 +24,7 @@ use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\App; class SendVerificationNotification implements ShouldQueue { @@ -53,6 +54,10 @@ class SendVerificationNotification implements ShouldQueue $event->user->service()->invite($event->company); + App::forgetInstance('translator'); + $t = app('translator'); + $t->replace(Ninja::transformTranslations($event->company->settings)); + $nmo = new NinjaMailerObject; $nmo->mailable = new UserAdded($event->company, $event->creating_user, $event->user); $nmo->company = $event->company;