controllers/FacturaController.php
/**
     * Creates a new Factura model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
Creates a new Factura model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed
Creates a new Factura model . If creation is successful the browser will be redirected to the ' view ' page . @return mixed
public function actionCreate()
    {
        $model = new Factura();
        $modelFlete = Flete::find()->with('lISTA','pagos')->all();
        if ($model->load(Yii::$app->request->post())) {
            var_dump($model);die;
            return $this->redirect(['view', 'id' => $model->ID]);
        } else {
            return $this->render('create', [
                'model' => $model,
                'modelFlete' => $modelFlete
            ]);
        }
    }
public function actionCreate ( ) { $ model = new Factura ( ) ; $ modelFlete = Flete :: find ( ) -> with ( 'lISTA' , 'pagos' ) -> all ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) ) { var_dump ( $ model ) ; die ; return $ this -> redirect ( [ 'view' , 'id' => $ model -> ID ] ) ; } else { return $ this -> render ( 'create' , [ 'model' => $ model , 'modelFlete' => $ modelFlete ] ) ; } }
Creates a new Factura model.
Creates a new Factura model .