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