/** * Creates a new Stream model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate($id) { $model = new Stream(); $model->pr_id = $id; if ($model->load(Yii::$app->request->post()) && $model->save()) { //return $this->redirect(['view', 'id' => $model->st_id]); return $this->redirect(['/project/update', 'id' => $model->pr_id]); } else { return $this->render('create', ['model' => $model]); } }