/** * Creates a new JackpotDetails model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new JackpotDetails(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', ['model' => $model]); } }
/** * Creates a new JackpotDetails model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { die("dsfsad"); $country = ''; //Yii::$app->customFun->prx("JackpotDetails"); $data = Yii::$app->request->post("JackpotDetails"); if (isset($data)) { //Yii::$app->customFun->prx($data); $country = \app\models\Country::find()->innerJoinWith('continents', false)->filterWhere(['name' => null, 'continents.id' => $data["continent"]])->all(); } $model = new JackpotDetails(); $continent = \app\models\Continents::find()->innerJoinWith('country', false)->all(); //Yii::$app->customFun->prx($continent); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', ['model' => $model, 'continents' => $continent, 'country' => $country]); } }