Download the PHP package reefki/laravel-geoip without Composer
On this page you can find all versions of the php package reefki/laravel-geoip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download reefki/laravel-geoip
More information about reefki/laravel-geoip
Files in reefki/laravel-geoip
Package laravel-geoip
Short Description A Laravel package to get IP addresses geographical location.
License MIT
Informations about the package laravel-geoip
Laravel GeoIP
A Laravel package to get geographical location information from IP addresses.
Requirements
- PHP 8.1 or higher
- Laravel 10, 11, or 12
Installation
Install the package via Composer:
Optionally, publish the config file:
Usage
Using the Facade
IPv6 addresses are also supported:
Disabling Cache
By default, results are cached. To get realtime data:
Using with Request
Get GeoIP data for the current request's IP address:
With anonymized IP (for GDPR compliance):
Get just the anonymized IP address:
Configuration
Default Driver
Set the default driver in your .env file:
Cache Settings
Configure caching behavior:
HTTP Settings
Configure timeout and retry for API requests:
Drivers
GeoJS (Default)
GeoJS is a free service with no API key required.
IPData
IPData requires an API key. Register for an account and add your key to .env:
Then use the driver:
Note: IPData offers 1,500 free requests per day. Higher usage requires a paid plan.
Testing
Credits
- Rifki Aria Gumelar
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-geoip with dependencies
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
eventsauce/object-hydrator Version ^1.4
guzzlehttp/guzzle Version ^7.0
symfony/http-foundation Version ^6.3|^7.0