bkhim/laravel-geolocation
最新稳定版本:4.4.1
Composer 安装命令:
composer require bkhim/laravel-geolocation
包简介
Laravel geolocation with built-in fraud prevention, risk scoring, MFA triggers, IP blocking, threat intelligence, and security auditing. 6 providers (IP2Location.io, MaxMind, IpInfo, IpStack, IpApi, IpGeolocation), proxy/VPN/Tor detection, login tracking, timezone/currency personalization for Larave
关键字:
README 文档
README
IP geolocation + fraud prevention for Laravel.
Detect proxy/VPN/Tor, trigger MFA on suspicious logins, personalize user experience.
✨ One Line of Code
$details = Geolocation::lookup(); echo $details->getCity(); // "Mountain View"
🛡️ Security First
if ($details->isProxy() || $details->isTor()) { return redirect()->route('mfa'); }
🌍 6 Providers. One API.
| Provider | Free Tier | Fraud Score | Proxy Detection |
|---|---|---|---|
| ipapi.co | 30k/mo | ❌ | ✅ |
| IP2Location.io | 50k/mo | ✅ | ✅ |
| IpInfo | Unlimited* | ❌ | ❌ |
| MaxMind | Unlimited | ❌ | ❌ |
| IPStack | 100/mo | ❌ | ❌ |
| IPGeolocation | 1k/mo | ✅ | ✅ |
*IpInfo Lite: country only
⚡ Quick Install
composer require bkhim/laravel-geolocation
php artisan vendor:publish --provider="Bkhim\Geolocation\GeolocationServiceProvider" --tag=geolocation-config
php artisan migrate
Documentation
- 🚀 Getting Started
- 🛡️ Security Features
- 🌍 Providers
- 📖 API Reference
- 🔧 Addons
- 🧪 Testing
- 🤝 Contributing
Use Cases
- 🔐 Login Security – MFA triggers on suspicious locations
- 💰 E-commerce – Local currency, geo-blocking
- 📊 Analytics – Visitor location tracking
- 🛡️ Fraud Prevention – Proxy/VPN/Tor detection
Built for Laravel 10–13 | PHP 8.2+ | MIT License
统计信息
- 总下载量: 762
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-22