/** * Creates a new TempUser model. * If creation is successful, the browser will be redirected to the 'payment' page. * @return mixed */ public function actionSignup() { //if the user already logged in if (!Yii::$app->user->isGuest) { return $this->redirect('dashboard'); } $model = new Tempuser(); $model->started = date('Y-m-d h:i'); if ($model->load(Yii::$app->request->post()) && $model->save()) { //var_dump($model->id); die; return $this->redirect(['payment', 'id' => $model->id]); } return $this->render('register', ['model' => $model]); }