StoreController.php 757 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 2018/5/18
  6. * Time: 下午17:28
  7. */
  8. namespace app\backend\modules\EnoughReduce\controllers;
  9. use app\common\components\BaseController;
  10. use app\common\exceptions\AppException;
  11. use app\common\facades\Setting;
  12. use app\common\facades\SiteSetting;
  13. use app\common\helpers\Url;
  14. class StoreController extends BaseController
  15. {
  16. public function index()
  17. {
  18. $setting = request()->input('setting');
  19. foreach ($setting as $key => $value) {
  20. // SiteSetting::set($key, $value);
  21. \Setting::set('enoughReduce.'.$key,$value);
  22. }
  23. return $this->successJson("设置保存成功", Url::absoluteWeb('goods.enough-reduce.index'));
  24. }
  25. }