应用地址
https://www.workerman.net/plugin/88
composer require workbunny/webman-ip-attribution
实现代码
$location = new Location();
$data = [
'ip' => $request->getRealIp($safe_mode=true),
'ips' => $location->getLocation($request->getRealIp($safe_mode=true)),
// 'address' => $location->city($request->getRealIp($safe_mode=true))
];
dd($data);
return json(['code' => 200,'message' => '请求成功','data'=>$data]);
按照系统配置好
有大佬帮忙看一下吗
你自己都说数据不全了,自行更新下数据库呗
已经接入阿里云的ip地址解析,问题已解决