updateOrCreate([ 'key' => 'unipush', ], ['value' => $input]); //清配置缓存 app(SettingService::class)->cleanCache('unipush'); return $this ->response() ->success('配置更新成功!') ->refresh(); } /** * Build a form here. */ public function form() { $appSettings = Setting::where('key', 'unipush')->value('value'); $this->switch('is_use', '是否启用')->value($appSettings['is_use'] ?? 0); $this->text('mall_app_id', '商城APP_ID')->value($appSettings['mall_app_id'] ?? ''); $this->text('mall_app_key', '商城APP_KEY')->value($appSettings['mall_app_id'] ?? ''); $this->text('mall_app_secret', '商城APP_SECRET')->value($appSettings['mall_app_id'] ?? ''); $this->text('mall_master_secret', '商城APP_MASTER_SECRET')->value($appSettings['mall_app_id'] ?? ''); $this->divider(); $this->switch('merchant_is_use', '是否启用')->value($appSettings['merchant_is_use'] ?? 0); $this->text('merchant_app_id', '商户APP_ID')->value($appSettings['merchant_app_id'] ?? ''); $this->text('merchant_app_key', '商户APP_KEY')->value($appSettings['merchant_app_key'] ?? ''); $this->text('merchant_app_secret', '商户APP_SECRET')->value($appSettings['merchant_app_secret'] ?? ''); $this->text('merchant_master_secret', '商户APP_MASTER_SECRET')->value($appSettings['merchant_master_secret'] ?? ''); } }