company->db); if(!config('services.tax.zip_tax.key')) return; $tax_provider = new \App\Services\Tax\Providers\TaxProvider($this->company, $this->client); try { $tax_provider->updateClientTaxData(); if (!$this->client->state && $this->client->postal_code) { $this->client->state = USStates::getState($this->client->postal_code); $this->client->save(); } }catch(\Exception $e){ nlog("problem getting tax data => ".$e->getMessage()); } } public function middleware() { return [new WithoutOverlapping($this->company->id)]; } }