token = $token; $this->locale = $locale ?? config('app.fallback_locale'); // Ensure locale is not empty if (empty($this->locale)) { $this->locale = config('app.fallback_locale'); } $this->onQueue('high'); } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['mail']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { // Set application locale for this email app()->setLocale($this->locale); $resetUrl = url(route('password.reset', [ 'token' => $this->token, 'email' => $notifiable->getEmailForPasswordReset(), ], false)); $subject = trans('Reset Password Notification', [], $this->locale); $expireMinutes = config('auth.passwords.users.expire'); return (new MailMessage()) ->from(timebank_config('mail.support.email'), timebank_config('mail.support.name')) ->subject($subject) ->view('emails.auth.reset-password', [ 'notifiable' => $notifiable, 'resetUrl' => $resetUrl, 'subject' => $subject, 'expireMinutes' => $expireMinutes, 'locale' => $this->locale, ]); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ // ]; } }