コード例 #1
0
 public function actionCreate()
 {
     $request = Yii::$app->request;
     $model = new Settings();
     if ($model->load($request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }