/** * Creates a new Rrhh model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Rrhh(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->idRRHH]); } else { return $this->render('create', ['model' => $model]); } }
/** * Creates a new Rrhh model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Rrhh(); $model->activate = 1; $model->descript = ""; if ($model->load(Yii::$app->request->post()) && $model->save()) { $model->descript = $model->Apellido . ", " . $model->Nombre . ", " . $model->Edad . " aƱos"; $model->save(); return $this->redirect(['view', 'id' => $model->idRRHH]); } else { return $this->render('create', ['model' => $model]); } }