public function actionCreate() { $model = new YiiUser(); $model->scenario = 'create'; $model->created_time = time(); $model->cnum = $model->createCompanyNum(); $model->load(Yii::$app->request->post()); if ($model->load(Yii::$app->request->post()) && $model->save()) { // Yii::$app->session->setFlash('success', '发送成功!'); return $this->redirect(['index']); } else { return $this->render('create', ['model' => $model]); } }