public function actionCreate($parentId) { $partner = Partner::findOne($parentId); $model = new Service(); $model->parentId = $parentId; $model->categoryId = $partner->parentId; if ($model->load($_POST) && $model->save()) { return $this->redirect(['/discount/admin/partner/update', 'id' => $parentId, 'section' => 'two']); } else { return $this->render('create', ['model' => $model]); } }