syncTransactions(); } } public function syncTransactions() { $a = Account::with('bank_integrations')->whereNotNull('bank_integration_account_id')->cursor()->each(function ($account){ // $queue = Ninja::isHosted() ? 'bank' : 'default'; // if($account->isPaid()) // { $account->bank_integrations->each(function ($bank_integration) use ($account){ nlog("processing {$account->bank_integration_account_id} - {$bank_integration->id}"); ProcessBankTransactions::dispatch($account->bank_integration_account_id, $bank_integration); }); // } }); } }