header('Authentication'); $appid = $request->header('appid'); if (!$auth || !$appid) { return response()->json([ 'code' => -1, 'msg' => 'header参数缺失', 'data' => [], 'status' => '500', ]); } // TODO 登录部分待优化 if (!Cache::get($auth)) { return response()->json([ 'code' => -1, 'msg' => '请先登录', 'data' => [], 'status' => '500', ]); } if (!Cache::get($appid)) { return response()->json([ 'code' => -1, 'msg' => 'lose appid', 'data' => [], 'status' => '500', ]); } return $next($request); } }