/** * Creates a new Provinsi model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Provinsi(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->PROVINCE_ID]); } else { return $this->render('create', ['model' => $model]); } }
public function actionIndex() { $provinsi = new Provinsi(); $kota = new Kota(); $harga = new Harga(); if ($provinsi->load(Yii::$app->request->post()) && $provinsi->save()) { return $this->redirect(['view', 'id' => $model->G_ORDER]); } else { return $this->render('index', ['provinsi' => $provinsi, 'kota' => $kota, 'model' => $harga]); } }