public function actionAdmin() { $model = new Venda('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Venda'])) { $model->attributes = $_GET['Venda']; } $this->render('admin', array('model' => $model)); }