/** * Creates a new Language model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Language(); if ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->getSession()->setFlash('success', Yii::t('app', 'Entry has been saved successfully!')); return $this->redirect(['view', 'id' => $model->intLanguageID]); } else { return $this->render('create', ['model' => $model]); } }