diff --git a/app/Notifications/Auth/Invitation.php b/app/Notifications/Auth/Invitation.php index d245ce652..4f079d5d8 100644 --- a/app/Notifications/Auth/Invitation.php +++ b/app/Notifications/Auth/Invitation.php @@ -42,9 +42,10 @@ class Invitation extends Notification * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { return (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->line(trans('auth.invitation.message_1')) ->action(trans('auth.invitation.button'), route('register', $this->invitation->token)) ->line(trans('auth.invitation.message_2')); diff --git a/app/Notifications/Auth/Reset.php b/app/Notifications/Auth/Reset.php index b7c454d21..ee8cd1053 100644 --- a/app/Notifications/Auth/Reset.php +++ b/app/Notifications/Auth/Reset.php @@ -14,10 +14,18 @@ class Reset extends Notification */ public $token; + /** + * The email address. + * + * @var string + */ + public $email; + /** * Create a notification instance. * * @param string $token + * @param string $email */ public function __construct($token, $email) { @@ -42,9 +50,10 @@ class Reset extends Notification * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { return (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->line(trans('auth.notification.message_1')) ->action(trans('auth.notification.button'), route('reset', ['token' => $this->token, 'email' => $this->email])) ->line(trans('auth.notification.message_2')); diff --git a/app/Notifications/Common/DownloadCompleted.php b/app/Notifications/Common/DownloadCompleted.php index 9ff34c764..796cc8f0e 100644 --- a/app/Notifications/Common/DownloadCompleted.php +++ b/app/Notifications/Common/DownloadCompleted.php @@ -49,9 +49,10 @@ class DownloadCompleted extends Notification implements ShouldQueue * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { return (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->subject(trans('notifications.download.completed.title')) ->line(new HtmlString('

')) ->line(trans('notifications.download.completed.description')) diff --git a/app/Notifications/Common/DownloadFailed.php b/app/Notifications/Common/DownloadFailed.php index 5ac32e3d4..2badb04e5 100644 --- a/app/Notifications/Common/DownloadFailed.php +++ b/app/Notifications/Common/DownloadFailed.php @@ -48,9 +48,10 @@ class DownloadFailed extends Notification implements ShouldQueue * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { return (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->subject(trans('notifications.download.failed.title')) ->line(new HtmlString('

')) ->line(trans('notifications.download.failed.description')) diff --git a/app/Notifications/Common/ExportCompleted.php b/app/Notifications/Common/ExportCompleted.php index 660646446..aac6521d6 100644 --- a/app/Notifications/Common/ExportCompleted.php +++ b/app/Notifications/Common/ExportCompleted.php @@ -49,9 +49,10 @@ class ExportCompleted extends Notification implements ShouldQueue * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { return (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->subject(trans('notifications.export.completed.title')) ->line(new HtmlString('

')) ->line(trans('notifications.export.completed.description')) diff --git a/app/Notifications/Common/ExportFailed.php b/app/Notifications/Common/ExportFailed.php index 90eaeed12..5d524975b 100644 --- a/app/Notifications/Common/ExportFailed.php +++ b/app/Notifications/Common/ExportFailed.php @@ -48,9 +48,10 @@ class ExportFailed extends Notification implements ShouldQueue * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { return (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->subject(trans('notifications.export.failed.title')) ->line(new HtmlString('

')) ->line(trans('notifications.export.failed.description')) diff --git a/app/Notifications/Common/ImportCompleted.php b/app/Notifications/Common/ImportCompleted.php index fc69db0ef..99e712c53 100644 --- a/app/Notifications/Common/ImportCompleted.php +++ b/app/Notifications/Common/ImportCompleted.php @@ -44,11 +44,12 @@ class ImportCompleted extends Notification implements ShouldQueue * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { $dashboard_url = route('dashboard', ['company_id' => company_id()]); return (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->subject(trans('notifications.import.completed.title')) ->line(new HtmlString('

')) ->line(trans('notifications.import.completed.description')) diff --git a/app/Notifications/Common/ImportFailed.php b/app/Notifications/Common/ImportFailed.php index 21c9c66f1..b04a9fc9b 100644 --- a/app/Notifications/Common/ImportFailed.php +++ b/app/Notifications/Common/ImportFailed.php @@ -48,9 +48,10 @@ class ImportFailed extends Notification implements ShouldQueue * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { $message = (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->subject(trans('notifications.import.failed.title')) ->line(new HtmlString('

')) ->line(trans('notifications.import.failed.description')); diff --git a/app/Notifications/Email/InvalidEmail.php b/app/Notifications/Email/InvalidEmail.php index 759addc21..e59bc714d 100644 --- a/app/Notifications/Email/InvalidEmail.php +++ b/app/Notifications/Email/InvalidEmail.php @@ -49,11 +49,12 @@ class InvalidEmail extends Notification implements ShouldQueue * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): MailMessage { $dashboard_url = route('dashboard', ['company_id' => company_id()]); return (new MailMessage) + ->from(config('mail.from.address'), config('mail.from.name')) ->subject(trans('notifications.email.invalid.title', ['type' => $this->type])) ->line(new HtmlString('

')) ->line(trans('notifications.email.invalid.description', ['email' => $this->email]))