2017 © Pedro Peláez
 

library geolocation

Geolocation services for Laravel 5.x

image

itech-ro/geolocation

Geolocation services for Laravel 5.x

  • Sunday, January 28, 2018
  • by itech-ro
  • Repository
  • 0 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Geolocation package for Laravel 5.x

This package provides geolocation information including country, city, latitude and longitude based on request IP. There are a few available providers: Extreme IP Lookup, Free GeoIP, Geobytes and Geoplugin., (*1)

Instalation

Install the package using composer:, (*2)

composer require itech-ro/geolocation

Edit app/config.php and add this line to providers array:, (*3)

    'providers' => [
        ...
        Roitech\Geolocation\GeolocationServiceProvider::class,
        ...
    ];

Create a configuration file config/geolocation.php with the content:, (*4)

<?php

return [

    'provider' => 'geoplugin',

];

How to use it

Once you set the preferred provider in config/geolocation.php (possible values: geobytes, freegeoip, extremeiplookup, geoplugin) the geolocation details can be accessed using the Geolocation facade:, (*5)

$coordinates = Geolocation::getCoordinates(); //returns an array [ 'lat' => LATITUDE, 'long' => LONGITUDE ]
$city = Geolocation::getCity();
$country = Geolocation::getCountry();

The Versions

28/01 2018

1.0.4

1.0.4.0

Geolocation services for Laravel 5.x

  Sources   Download

MIT

The Requires

 

by JB

28/01 2018

dev-master

9999999-dev

Geolocation services for Laravel 5.x

  Sources   Download

MIT

The Requires

 

by JB

28/01 2018

1.0.3

1.0.3.0

Geolocation services

  Sources   Download

MIT

The Requires

 

by JB

28/01 2018

dev-develop

dev-develop

Geolocation services

  Sources   Download

The Requires

 

by JB

28/01 2018

1.0.2

1.0.2.0

Geolocation services

  Sources   Download

The Requires

 

by JB

28/01 2018

1.0.1

1.0.1.0

Geolocation services

  Sources   Download

The Requires

 

by JB

27/01 2018

1.0

1.0.0.0

Geolocation services

  Sources   Download

The Requires

 

by JB