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