db); $this->company = Company::find($this->company_id); $this->matchTransactions(); } private function matchTransactions() { BankTransaction::where('company_id', $this->company->id) ->where('status_id', BankTransaction::STATUS_UNMATCHED) ->cursor() ->each(function ($bt){ (new BankService($bt))->processRules(); }); } public function middleware() { return [new WithoutOverlapping($this->company_id)]; } }