PHPackages                             movemoveapp/laravel-maxmind - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. movemoveapp/laravel-maxmind

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

movemoveapp/laravel-maxmind
===========================

A Laravel package for reading MaxMind GeoIP2 data passed from Nginx via FastCGI parameters. Supports automatic detection of location and ISP information using predefined headers, with full configuration support.

1.0.2(11mo ago)065MITPHPPHP ^8.0|^8.1|^8.2|^8.3|^8.4

Since May 15Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/movemoveapp/laravel-maxmind)[ Packagist](https://packagist.org/packages/movemoveapp/laravel-maxmind)[ RSS](/packages/movemoveapp-laravel-maxmind/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

🌍 Laravel MaxMind
=================

[](#-laravel-maxmind)

[![Latest Stable Version](https://camo.githubusercontent.com/ff62ea53227110fdc896ce5e48588a24581686d179de56c059840b5da945eff4/687474703a2f2f706f7365722e707567782e6f72672f6d6f76656d6f76656170702f6c61726176656c2d6d61786d696e642f76)](https://packagist.org/packages/movemoveapp/laravel-maxmind)[![Total Downloads](https://camo.githubusercontent.com/0ab82a6d87788a942e093f0aba646283060cbcfcda20c7cae4cbf1b3b9a5ae33/687474703a2f2f706f7365722e707567782e6f72672f6d6f76656d6f76656170702f6c61726176656c2d6d61786d696e642f646f776e6c6f616473)](https://packagist.org/packages/movemoveapp/laravel-maxmind)[![Latest Unstable Version](https://camo.githubusercontent.com/36b12b29003af8416ee80145a960ce23fb95417d20980666589156744e5779f6/687474703a2f2f706f7365722e707567782e6f72672f6d6f76656d6f76656170702f6c61726176656c2d6d61786d696e642f762f756e737461626c65)](https://packagist.org/packages/movemoveapp/laravel-maxmind)[![License](https://camo.githubusercontent.com/1f7c9eb3cbc6ca80b42635c3104f13cf4bcb68c9a3d8d2d07283fdced5b87a64/687474703a2f2f706f7365722e707567782e6f72672f6d6f76656d6f76656170702f6c61726176656c2d6d61786d696e642f6c6963656e7365)](https://packagist.org/packages/movemoveapp/laravel-maxmind)[![PHP Version Require](https://camo.githubusercontent.com/02a2c608cd646a626490c6c6ebf42750b8202235876e6fb341aff732122879d5/687474703a2f2f706f7365722e707567782e6f72672f6d6f76656d6f76656170702f6c61726176656c2d6d61786d696e642f726571756972652f706870)](https://packagist.org/packages/movemoveapp/laravel-maxmind)

**Laravel MaxMind** is a simple and flexible package for accessing [MaxMind GeoIP2](https://maxmind.com/) data passed via Nginx FastCGI parameters.

It allows your Laravel application to read geolocation and ISP information that is resolved by Nginx using the GeoIP2 module, without querying MaxMind databases directly from PHP.

---

Features
--------

[](#features)

- Automatically parses FastCGI parameters set by Nginx with MaxMind GeoIP2 data
- Supports continent, country, region, city, postal, connection, and ISP data
- Configuration file to override default parameter names
- No need to access MaxMind database from PHP – uses data injected by Nginx

---

Requirements
------------

[](#requirements)

- Laravel 10+
- Nginx with `ngx_http_geoip2_module`
- MaxMind `.mmdb` database files
- FastCGI configuration passing GeoIP data to PHP

---

Installation
------------

[](#installation)

```
composer require movemoveapp/laravel-maxmind
```

Register the Service Provider
-----------------------------

[](#register-the-service-provider)

After installing the package, you need to register the MaxMind service provider.

### Laravel 10 and below

[](#laravel-10-and-below)

Add the following line to the providers array in your `config/app.php` file:

```
...
'providers' => [
    // Other providers...
    MoveMoveApp\Maxmind\MaxmindServiceProvider::class,
],
```

### Laravel 11 and above

[](#laravel-11-and-above)

Register the service provider in the `bootstrap/providers.php` file:

```
