tokenRepo = $tokenRepo; $this->datatableService = $datatableService; } protected function getRepo() { return $this->tokenRepo; } public function getDatatable($userId) { $datatable = new TokenDatatable(false); $query = $this->tokenRepo->find($userId); return $this->datatableService->createDatatable($datatable, $query); } }