Download the PHP package laravelcm/abstract-ip-geolocation without Composer

On this page you can find all versions of the php package laravelcm/abstract-ip-geolocation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package abstract-ip-geolocation

Laravel v10.x Total Downloads Latest Stable Version License

Abstract API Abstract’s IP Geolocation API Laravel Client Library

Getting Started

Abstract’s IP Geolocation API is a fast, lightweight, modern, and RESTful JSON API for determining the location and other details of IP addresses from over 190 countries.

The free plan is limited to 1,000 requests per month. To enable all the data fields and additional request volumes see https://www.abstractapi.com/api/ip-geolocation-api#pricing.

Installation

The package works with PHP 8 and is available using Composer.

Usage

Open your application's \app\Http\Kernel.php file and add the following to the Kernel::middleware property:

Quick Start

Will return the following string to the index view:

Mais par défaut cet object $geolocation est une instance de la classe \Laravelcm\AbstractIpGeolocation\DataObject\GeolocationData qui donne toutes les valeurs transformées de l'API (tableau) en objet PHP. Les informations sont stockées par défaut dans la session depuis le middleware, ce qui vous permet d'avoir accès aux informations n'importe où dans votre code.

Voici le contenu de l'objet $geolocation apres un dump:

Configuration

Config file are located at config/abstract-ip-geolocation.php after publishing provider element.

Fields

By default, all fields are returned by the Abstract API, but you can choose to retrieve just the values you're interested in from the API. To do this, you need to specify the fields you want (the list of fields is available here https://docs.abstractapi.com/ip-geolocation#request-parameters).

Once you've specified the fields you want (e.g. country,currency) only these values will be returned by the API and in your geolocations DTO object, you'll only have the country and currency values available - the others will be null.

To access this information, consult session().

DTO

The available DTO classes are listed below. In the json return from the Abstract Geolocation API, all objects are represented by DTO classes

License

This package is open-sourced software licensed under the MIT license.


All versions of abstract-ip-geolocation with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
illuminate/support Version ^10.0|^11.0
spatie/laravel-package-tools Version ^1.15
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laravelcm/abstract-ip-geolocation contains the following files

Loading the files please wait ....