user = User::query()->where('id', $userId)->first(); $this->newPass = $newPass; } /** * Build the message. * * @return $this * @throws \Exception */ public function build() { return $this->from(Settings::settingValue('site.main.email'))->subject('Password reset')->view('emails.passwordReset')->with(['newPass' => $this->newPass, 'userName' => $this->user->username, 'site' => Settings::settingValue('site.main.title')]); } }