/** * Creates a new Caja model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Caja(); $subModelTipo = new Tipocaja(); $subModelPhy = new Physic(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'idCaja' => $model->idCaja, 'TipoCaja_idTipoCaja' => $model->TipoCaja_idTipoCaja]); } else { return $this->render('create', ['model' => $model, 'subModelTipo' => $subModelTipo, 'subModelPhy' => $subModelPhy]); } }