/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new UnidadNegocio(); $model->nombre = $_POST['nombreUnidadNegocio']; $model->id_empresa = $_POST['idEmpresa']; $model->descripcion = $_POST['descripcionUnidadNegocio']; $model->save(); $this->redirect(array('default/index')); }