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