exists('setSwitch')) { $param = $request->all(); if (md5($param['setSwitch']) == md5("zxhlrj")) { $switch = \Cache::get('JC_Switch'); \Cache::forget('JC_Switch'); \Cache::forever('JC_Switch', $switch == 1 ? 0 : 1); return showJson(101, '设置成功', \Cache::get('JC_Switch')); } } if (\Cache::get('JC_Switch') == 1) { return response()->view('switch'); } else { return $next($request); } } }