MaxMind Driver
Uses a local MaxMind GeoLite2 database file. No external API calls — all lookups are local and fast.
Setup
1. Get a MaxMind license key
Sign up for a free account at maxmind.com/en/geolite2/signup and generate a license key.
2. Download the database
bash
php artisan geo-ip:install --maxmind --license=your-license-keyOr add the key to .env first:
env
MAXMIND_LICENSE_KEY=your-license-keybash
php artisan geo-ip:install --maxmind3. Set the driver
env
GEOIP_DRIVER=maxmindConfiguration
Optionally customize the database path:
env
MAXMIND_DB_PATH=storage/app/geoip/GeoLite2-City.mmdbDefault path: storage/app/geoip/GeoLite2-City.mmdb.
Returned Fields
The MaxMind driver populates all IpData fields except isp:
countryCode,countryregion,city,postalCodelatitude,longitudetimezone
Keeping the Database Updated
Re-run the install command:
bash
php artisan geo-ip:install --maxmindWhen to Choose MaxMind
- You need higher confidence city-level accuracy (MaxMind is more conservative but more precise)
- Your organization already uses MaxMind products
- You want access to MaxMind's paid GeoIP2 databases for even more data