public function actionAdmin() { $model = new Voucher('search'); $model->unsetAttributes(); if (isset($_GET['Voucher'])) { $model->setAttributes($_GET['Voucher']); } $this->render('admin', array('model' => $model)); }