public function actionCreate() { $model = new IguRegistration(); if (isset($_POST['IguRegistration'])) { $model->setAttributes($_POST['IguRegistration']); if ($model->save()) { if (Yii::app()->getRequest()->getIsAjaxRequest()) { Yii::app()->end(); } else { $this->redirect(array('iguPayment/create', 'id' => $model->id)); } } } $this->render('create', array('model' => $model)); }