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