accountGatewayRepo = $accountGatewayRepo; $this->datatableService = $datatableService; } protected function getRepo() { return $this->accountGatewayRepo; } public function getDatatable($accountId) { $query = $this->accountGatewayRepo->find($accountId); return $this->datatableService->createDatatable(new AccountGatewayDatatable(false), $query); } }