/** * Comments list page. */ public function actionIndex() { $searchModel = new CommentSearch(); $dataProvider = $searchModel->search(Yii::$app->request->get()); $statusArray = Comment::statusLabels(); $modelArray = CommentModel::getModelArray(); return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel, 'statusArray' => $statusArray, 'modelArray' => $modelArray]); }
/** * Lists all Comment models. * @return mixed */ public function actionIndex() { $searchModel = new CommentSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }