invoice = $invoice; $this->notify = $notify; $this->description = $description; } /** * Execute the job. * * @return InvoiceHistory */ public function handle() { $description = $this->description ?: trans_choice('general.payments', 1); $invoice_history = InvoiceHistory::create([ 'company_id' => $this->invoice->company_id, 'invoice_id' => $this->invoice->id, 'status_code' => $this->invoice->invoice_status_code, 'notify' => $this->notify, 'description' => $description, ]); return $invoice_history; } }