public function actionRegistro()
 {
     $model = new ModelRegistro();
     if ($model->load(yii::$app->request->post())) {
         $tabla1 = new DbPerfil();
         $tabla2 = new DbUsuarios();
         $tabla1->nombre = $model->nombre;
     } else {
         # code...
     }
     return $this->render("registro", ["model" => $model]);
 }
 public function actionCreate()
 {
     $model = new ModelRegistro();
     $mensaje = null;
     if ($model->load(yii::$app->request->post())) {
         if ($model->validate()) {
             $tabla = new Registro();
             $tabla->nombre = $model->nombre;
             $tabla->apellido = $model->apellido;
             $tabla->CI = $model->CI;
             $tabla->email = $model->email;
             $tabla->usuario = $model->usuario;
             $tabla->clave = $model->clave;
             if ($tabla->insert()) {
                 $mensaje = "registro exitoso";
                 $model->nombre = null;
                 $model->apellido = null;
                 $model->CI = null;
                 $model->email = null;
                 $model->usuario = null;
                 $model->clave = null;
             } else {
                 $mensaje = "no se registro";
             }
         } else {
             $model->getErrors();
         }
     }
     return $this->render("create", ["model" => $model, "mensaje" => $mensaje]);
 }