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