updateOrCreate([ 'key' => 'withdraw', ], ['value' => $input]); //清配置缓存 app(SettingService::class)->cleanCache('withdraw'); return $this ->response() ->success('配置更新成功!') ->refresh(); } /** * Build a form here. */ public function form() { $appSettings = Setting::where('key', 'withdraw')->value('value'); // $this->switch('is_use', '提现开关')->value($appSettings['is_use'] ?? 0); $this->number('threshold_amount', '起提金额(元)')->value($appSettings['threshold_amount'] ?? 0); $this->currency('rate', '提现费率')->value($appSettings['rate'] ?? 0)->symbol('%'); } }