alfa-dev-team/abstractapi-geo

A description for abstractapi-geo.

1.0 2022-04-19 15:47 UTC

This package is auto-updated.

Last update: 2024-03-19 20:19:07 UTC


README

Software License Travis Total Downloads

Install

composer require alfa-dev-team/abstractapi-geo

php artisan vendor:publish --provider="AlfaDevTeam\AbstractapiGeo\AbstractapiGeoServiceProvider" --tag="migrations"

Usage

Add parameter ABSTRACTAPI_IP_GEOLOCATION_API_KEY= to the .env file.
You can then use Location::getGeoByIp({ip}) to retrieve the location object. After you can call follow method:

  • getCountry();
  • getCity();
  • getСoordinates();

Testing

Run the tests with:

vendor/bin/phpunit