/** * 新建 * @return {[type]} [description] * @version 1.0 2015-12-31T17:27:14+0800 * @author cnzhangxl@foxmail.com */ public function actionCreate() { $model = new JobLevel(['scenario' => 'create']); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', ['model' => $model]); } }