/**
  * Creates a new Physic model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new Physic();
     $model->loadDefaultValues();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         $model->descript = "(" . $model->large . " x " . $model->tall . " x " . $model->width . ")" . $model->longUnit . "; Peso maximo= " . $model->maxWeight . " " . $model->weightUnit;
         $model->save();
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
 /**
  * Creates a new Physic model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionPhysic()
 {
     $subModelPhy = new Physic();
     if ($subModelPhy->load(Yii::$app->request->post()) && $subModelPhy->save()) {
         return $this->actionIndex();
     } else {
         return $this->render('../physic/create', ['model' => $subModelPhy]);
     }
 }
 /**
  * Creates a new Physic model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new Physic();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }