whereNull('deleted_at')->where('status', 1)->first(); if (empty($externalApp)) { throw new \Exception('应用不存在'); } // 验证服务器ip if (!empty($externalApp->white_ip) && !in_array(request()->getRealIp(), explode(',', $externalApp->white_ip))) { throw new \Exception('IP认证不通过'); } } catch (\Exception $e) { return jsonFailResponse($e->getMessage(), [], 0); } return $handler($request); } }