db); BankTransaction::where('company_id', $this->company_id) ->where('status_id', BankTransaction::STATUS_UNMATCHED) ->cursor() ->each(function ($bt){ (new BankService($bt))->processRules(); }); } public function middleware() { $middleware_key = "bank_match_rate:{$this->company_id}"; return [new WithoutOverlapping($middleware_key)]; } }