PHPackages                             bkhim/laravel-geolocation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. bkhim/laravel-geolocation

ActiveLibrary[Security](/categories/security)

bkhim/laravel-geolocation
=========================

Laravel geolocation with built-in fraud prevention, risk scoring, MFA triggers, and security event monitoring. 5 providers, proxy/VPN/Tor detection, login tracking, timezone/currency personalization for Laravel 10-13

4.2.0(1mo ago)14441MITPHPPHP ^8.2CI passing

Since Mar 22Pushed 1mo agoCompare

[ Source](https://github.com/bkhim/laravel-geolocation)[ Packagist](https://packagist.org/packages/bkhim/laravel-geolocation)[ Docs](https://github.com/bkhim/laravel-geolocation)[ RSS](/packages/bkhim-laravel-geolocation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (22)Used By (0)

Laravel Geolocation
===================

[](#laravel-geolocation)

**IP geolocation + fraud prevention for Laravel.**
Detect proxy/VPN/Tor, trigger MFA on suspicious logins, personalize user experience.

[![Latest Version](https://camo.githubusercontent.com/b05fee2a48ffe5a6bfccc47d40d25b467393759ea93bd5a369e3bd07460b6639/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626b68696d2f6c61726176656c2d67656f6c6f636174696f6e2e737667)](https://packagist.org/packages/bkhim/laravel-geolocation)[![Total Downloads](https://camo.githubusercontent.com/ff3931776a4d84358f3db004fca4f7d4ab1c11ae79ed2e71948951efcc881ea4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626b68696d2f6c61726176656c2d67656f6c6f636174696f6e2e737667)](https://packagist.org/packages/bkhim/laravel-geolocation)[![Tests](https://github.com/bkhim/laravel-geolocation/workflows/Tests/badge.svg)](https://github.com/bkhim/laravel-geolocation/actions)[![License](https://camo.githubusercontent.com/7d5f460ef4bc64c8e6b06e8786c986a508526b399f6d9af11d19f7640a815ba0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626b68696d2f6c61726176656c2d67656f6c6f636174696f6e2e737667)](https://github.com/bkhim/laravel-geolocation/blob/main/LICENSE)

---

✨ One Line of Code
------------------

[](#-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.

ProviderFree TierFraud ScoreProxy Detectionipapi.co30k/mo❌✅IP2Location.io50k/mo✅✅IpInfoUnlimited\*❌❌MaxMindUnlimited❌❌IPStack100/mo❌❌IPGeolocation1k/mo✅✅\*IpInfo Lite: country only

[→ Compare all providers](docs/providers/index.md)

---

⚡ Quick Install
---------------

[](#-quick-install)

```
composer require bkhim/laravel-geolocation
php artisan vendor:publish --provider="Bkhim\Geolocation\GeolocationServiceProvider"
```

📚 Documentation
---------------

[](#-documentation)

- [🚀 Getting Started](docs/getting-started/installation.md)
- [🛡️ Security Features](docs/security/mfa-integration.md)
- [🌍 Providers](docs/providers/index.md)
- [📖 API Reference](docs/api-reference.md)
- [🔧 Addons](docs/addons/gdpr-consent.md)
- [🧪 Testing](docs/testing.md)
- [🤝 Contributing](docs/contributing.md)

🎯 Use Cases
-----------

[](#-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](LICENSE)

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance92

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Recently: every ~4 days

Total

20

Last Release

46d ago

Major Versions

2.1.6 → 3.0.02025-12-08

3.0.0 → 4.0.02025-12-12

PHP version history (3 changes)v2.0.0PHP &gt;=8.2

2.1.0PHP ^8.2

2.1.6PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b0833d8d8678b4a3cc6ba5dc998771e22c62097e6b7934e5ecd6e6ad20dc889?d=identicon)[bkhim](/maintainers/bkhim)

---

Top Contributors

[![bkhim](https://avatars.githubusercontent.com/u/18440447?v=4)](https://github.com/bkhim "bkhim (72 commits)")[![adrianorsouza](https://avatars.githubusercontent.com/u/5430240?v=4)](https://github.com/adrianorsouza "adrianorsouza (47 commits)")[![BrekiTomasson](https://avatars.githubusercontent.com/u/7026735?v=4)](https://github.com/BrekiTomasson "BrekiTomasson (2 commits)")[![masmaleki](https://avatars.githubusercontent.com/u/5430351?v=4)](https://github.com/masmaleki "masmaleki (1 commits)")[![ooi2018](https://avatars.githubusercontent.com/u/251248496?v=4)](https://github.com/ooi2018 "ooi2018 (1 commits)")

---

Tags

geocodinggeoipgeolocationipip-apiip-lookupipgeolocationipinfoipstacklaravellaravel-packagelocationlaravelcurrencysecuritygeolocationmaxmindIPlocationtorMFAfraud preventiontimezoneipinfoipstackvpn detectionipgeolocationlogin-trackingProxy detectionrisk-scoring

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/bkhim-laravel-geolocation/health.svg)

```
[![Health](https://phpackages.com/badges/bkhim-laravel-geolocation/health.svg)](https://phpackages.com/packages/bkhim-laravel-geolocation)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)[jorijn/laravel-security-checker

Added Laravel functionality to the Enlightn Security Checker. Adds a command to check for, and optionally emails you, vulnerabilities when they affect you.

2021.8M1](/packages/jorijn-laravel-security-checker)[tzsk/otp

A secure, database-free One-Time Password (OTP) generator and verifier for PHP and Laravel.

241641.4k1](/packages/tzsk-otp)[dgtlss/warden

A Laravel package that proactively monitors your dependencies for security vulnerabilities by running automated composer audits and sending notifications via webhooks and email

8745.6k](/packages/dgtlss-warden)[adrianorosa/laravel-geolocation

Laravel Geo Location package to get details for a given IP Address

6593.3k1](/packages/adrianorosa-laravel-geolocation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
