public function actionAdd() { $model = new Store(); if ($model->load(Yii::$app->request->post())) { if ($model->save()) { Yii::$app->session->setFlash('success', '成功添加营业点“' . $model->name . '”。'); return $this->redirect(['index']); } else { Yii::$app->session->setFlash('danger', '添加营业点失败。'); } } return $this->render('form', ['model' => $model]); }