public function actionJson() { header("Content-Type: application/json"); $remoteAgents = new GoAutoDialRemoteUser(); $alldata = $remoteAgents->getAll(); echo json_encode($alldata); }
/** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { $remoteAgents = new GoAutoDialRemoteUser(); $alldata = $remoteAgents->getAll(); $dataprovider = new CArrayDataProvider($alldata, array('keyField' => 'live_agent_id')); $dataprovider->pagination = false; $this->render('index', compact('dataprovider')); }