/** * Manages all models. * * @return void */ public function actionIndex() { $model = new FeedBack('search'); $model->unsetAttributes(); // clear any default values $model->setAttributes(Yii::app()->getRequest()->getParam('FeedBack', [])); $this->render('index', ['model' => $model]); }
/** * Manages all models. */ public function actionAdmin() { $model = new FeedBack('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['FeedBack'])) { $model->attributes = $_GET['FeedBack']; } $this->render('admin', array('model' => $model)); }