company = $company; } /** * Execute the job. * */ public function handle() { MultiDB::setDb($this->company->db); $cgs = CompanyGateway::query() ->where('company_id', $this->company->id) ->where('is_deleted', 0) ->whereIn('gateway_key', $this->stripe_keys) ->get(); $cgs->each(function ($company_gateway) { $company_gateway->driver(new Client())->importCustomers(); }); } public function failed($exception) { nlog('Stripe import customer methods exception'); nlog($exception->getMessage()); } }