order = $order; } /** * Execute the job. */ public function handle(): void { if (! $this->order->confirmMailSent) { /** @var \App\Models\Customer $customerModel */ $customerModel = $this->order->customer; $customerModel->notify(new NewOrder($this->order)); $this->order->confirmMailSent = true; $this->order->saveOrFail(); Log::debug('Shop mail is sent', $this->order->toArray()); } else { Log::debug('Shop mail is already sent', $this->order->toArray()); } } }