drongotech/iplocationmanager

Using IP Stack to get request ip and save the ip meta data

v1.0.7 2022-07-17 13:56 UTC

This package is auto-updated.

Last update: 2024-12-17 21:02:39 UTC


README

Laravel logo

IP location manager uses Ipstack to do a look up of the client ip address. The data include :-

ip: "xxx.xxx.xxx.xxx" type: "ipv4" continent_code: "AF" continent_name: "Africa" country_code: "KE" country_name: "Kenya" region_code: "30" region_name: "Nairobi Area" city: "Nairobi" zip: 00001 ...... sea more

To install :

composer require drongotech/iplocationmanager

php artisan vendor:publish --tag=dt-config

php artisan vendor:publish --tag=dt-migrations

php artisan migrate

Add anywhere on your project to log the ip data using:-

use Drongotech\Events\Iplocationmanager\LogIpEvent;

LogIpEvent::dispatch([]);