Download the PHP package black-sheep-tech/laravel-ip-api without Composer
On this page you can find all versions of the php package black-sheep-tech/laravel-ip-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download black-sheep-tech/laravel-ip-api
More information about black-sheep-tech/laravel-ip-api
Files in black-sheep-tech/laravel-ip-api
Package laravel-ip-api
Short Description A simple service provider/wrapper for the IP API Service (https://ip-api.com).
License MIT
Homepage https://github.com/BlackSheepTech/ip-api
Informations about the package laravel-ip-api
Laravel IpApi is a Laravel focused package that provides an easy way to get information about an IP address using the IpApi API.
Installation
You can install the package via composer:
General Config
The package just works out of the box, but you can customize it to your liking.
On the fly
Using environment variables
You can set the following environment variables in your .env
file:
Config File
For a more tailored configuration, you can publish the config file to your project by running the following command:
This will create a ip-api.php
file in your config
directory, where you can customize the package config to your liking.
Overusage Protection
The package comes with a built-in overusage protection feature that will prevent you from making excessive requests to the API getting you temporarily banned. But, of course, you can disable this feature by setting the "IP_API_OVERUSAGE_PROTECTION" environment variable to false.
It can also be disabled on the fly:
Usage
The package offers acess to both the geolocation and Batch APIs.
Geolocation API
-
Basic Usage
-
Advanced Usage
- Return as Object
You can get the response as an object by doing the following:
Batch API
-
Basic Usage
-
Customized Return
- Return as Object
You can get the response as an object by doing the following:
Requirements
- PHP 8.0 or higher
- Laravel framework version 9.0 or higher
License
This package is open-sourced software licensed under the MIT license.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request on GitHub.
Credits
All versions of laravel-ip-api with dependencies
illuminate/config Version ^10.48.4|^11.0.8
illuminate/console Version ^10.48.4|^11.0.8
illuminate/contracts Version ^10.48.4|^11.0.8
illuminate/http Version ^10.48.4|^11.0.8
illuminate/support Version ^10.48.4|^11.0.8
symfony/console Version ^6.0|^7.0
archtechx/enums Version ^1.1