| xqd
@@ -60,4 +60,20 @@ class SettingController extends Controller
|
|
|
|
|
|
return view($this->view_path . 'system', compact('pre_uri', 'model', 'model_name', 'check_card_location', 'check_card_radius'));
|
|
|
}
|
|
|
+
|
|
|
+ public function updateSystem(Request $request)
|
|
|
+ {
|
|
|
+ if(!$request->isMethod('POST')) {
|
|
|
+ return $this->showWarning('访问错误');
|
|
|
+ }
|
|
|
+
|
|
|
+ $items = collect(['check_card_location', 'check_card_radius']);
|
|
|
+
|
|
|
+ foreach($items as $item) {
|
|
|
+ if(!empty($request->input($item))) {
|
|
|
+ $this->model->where('key', $item)->update(['value' => $request->input($item)]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return $this->showMessage('操作成功');
|
|
|
+ }
|
|
|
}
|