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