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