*/ public function handle($request, \Closure $next) { $header = config('apiadmin.CROSS_DOMAIN'); $appInfo = $request->APP_CONF_DETAIL; $apiInfo = $request->API_CONF_DETAIL; $allRules = explode(',', $appInfo['app_api']); if (!in_array($apiInfo['hash'], $allRules)) { return json([ 'code' => ReturnCode::INVALID, 'msg' => '非常抱歉,您没有权限这么做!', 'data' => [] ])->header($header); } return $next($request); } }