accountGatewayRepo = $accountGatewayRepo; $this->datatableService = $datatableService; } /** * @return AccountGatewayRepository */ protected function getRepo() { return $this->accountGatewayRepo; } /** * @param $accountId * * @return \Illuminate\Http\JsonResponse */ public function getDatatable($accountId) { $query = $this->accountGatewayRepo->find($accountId); return $this->datatableService->createDatatable(new AccountGatewayDatatable(false), $query); } }