Download the PHP package default-089/sxgeo without Composer
On this page you can find all versions of the php package default-089/sxgeo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download default-089/sxgeo
More information about default-089/sxgeo
Files in default-089/sxgeo
Informations about the package sxgeo
GeoIP for Laravel 7
The data comes from a database and from service http://sypexgeo.net
Installation
- SypexGeo for Laravel 5 on Packagist
- SypexGeo for Laravel 5 on GitHub
- SypexGeo for Laravel 7 on GitHub
- SypexGeo for Laravel 7 on Packagist
To get the latest version of SypexGeo simply require it in your composer.json
file.
"default-089/sxgeo": "0.15.*@dev"
You'll then need to run composer install
to download it and have the autoloader updated.
The package will automatically register a service provider.
Publish the configurations
Run this on the command line from the root of your project:
$ php artisan vendor:publish --tag=sxgeo-config
A configuration file will be publish to config/sxgeo.php
Usage
Getting the location data for a given IP:
Example Data
If data is received from the database - config/sypexgeo.php ('type' => 'database')
If data is received from the webservice - config/sypexgeo.php ( 'type' => 'web_service', 'view' => 'json' )
Default Location
In the case that a location is not found the fallback location will be returned with the default
parameter set to true
. To set your own default change it in the configurations config/geoip.php
Services
Scriptix
- Database Service: To use the database version of SypexGeo services download the
SxGeoCityMax.dat
from (vendor/scriptixru/sypexgeo/scr/Scriptixru/SypexGeo) and extract it to/database/sypexgeo/
. And that's it.