user = $user; $this->invoice = $invoice; $this->type = $type; $this->payment = $payment; $this->notes = $notes; $this->server = config('database.default'); } /** * Execute the job. * * @param ContactMailer $mailer */ public function handle(UserMailer $userMailer) { if (config('queue.default') !== 'sync') { $this->user->account->loadLocalizationSettings(); } $userMailer->sendNotification($this->user, $this->invoice, $this->type, $this->payment, $this->notes); } }