public function actionIndex() { $model = new Spell('search'); $model->unsetAttributes(); if (isset($_GET['Spell'])) { $model->attributes = $_GET['Spell']; } $this->render('index', array('model' => $model)); }