post('content'))||!is_numeric($request->post('jsday'))) { return showJsonErr('请输入数字'); } if (!Config::where('key', '=', 'WITHDRAWMIN')->update(['content' => $request->post('content')])) { return showJsonErr('更新提现额度失败'); } if (!Config::where('key', '=', 'JSDAY')->update(['content' => $request->post('jsday')])) { return showJsonErr('更新结算日失败'); } return showJsonSucc('更新成功'); } /** * 获取配置信息 * @author lyh * @date 2019/4/24 * @param Request $request * @description */ public function show(Request $request) { $validator = \Validator::make($param = $request->all(), [ 'key' => 'required|exists:config,key' ]); if ($validator->fails()) { return showJsonErr($validator->errors()->first()); } $res = Config::getValue($param['key']); return showJsonSucc(1001, $res); } }