public function actionCreate() { $model = new Variable(); if ($model->load(Yii::$app->request->post())) { if ($model->checkExist()) { LuLu::setFalsh('warning', $model->id . ':已经存在'); return $this->refresh(); } $model->save(); CacheUtility::createVariableCache(); return $this->redirect(['index']); } else { return $this->render('create', ['model' => $model]); } }