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("Account = {$account->id} - {$bank_integration->id}"); ProcessBankTransactions::dispatchSync($account->bank_integration_account_id, $bank_integration); }); // } }); } }