PHPackages                             ixudra/geo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ixudra/geo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ixudra/geo
==========

Custom PHP geo-location services library for the Laravel 5 framework - developed by Ixudra

6.2.0(8y ago)11.9k[1 issues](https://github.com/ixudra/geo/issues)MITPHPPHP &gt;=5.4.0

Since Apr 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ixudra/geo)[ Packagist](https://packagist.org/packages/ixudra/geo)[ Docs](http://ixudra.be)[ RSS](/packages/ixudra-geo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

ixudra/geo
==========

[](#ixudrageo)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1d5f1b4551598701ba95bed82fd9a0abf1ec6c58b396b784fadbfb3568686cc6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6978756472612f67656f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ixudra/geo)![license](https://camo.githubusercontent.com/46f5467d16fb63848389b4aa48feb17abbab9e626a4ea3ce17ad04186af89a6e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6978756472612f67656f2e737667)[![StyleCI](https://camo.githubusercontent.com/c87a40cc4ed389e8d68b07cec3e8a8be4de0645451bc3d7ef1537d44fbfa2351/68747470733a2f2f7374796c6563692e696f2f7265706f732f33333835373336342f736869656c64)](https://styleci.io/repos/33857364)[![Total Downloads](https://camo.githubusercontent.com/ad456444ef44f453a92e3c00a8e541fc9d634cd769ff5006d9627fcb7468ee3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6978756472612f67656f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ixudra/geo)

Custom PHP geo-location services library for the Laravel 5 framework - developed by [Ixudra](http://ixudra.be).

This package can be used by anyone at any given time, but keep in mind that it is optimized for my personal custom workflow. It may not suit your project perfectly and modifications may be in order.

Installation
------------

[](#installation)

Pull this package in through Composer.

```
    {
        "require": {
            "ixudra/geo": "6.*"
        }
    }
```

or run in terminal: `composer require ixudra/geo`

### Laravel 5.\* Integration

[](#laravel-5-integration)

Add the service provider to your `config/app.php` file:

```
    'providers'         => array(

        //...
        Ixudra\Geo\GeoServiceProvider::class,

    ),
```

Add the facade to your `config/app.php` file:

```
    'aliases'           => array(

        //...
        'Geo'               => Ixudra\Geo\Facades\Geo::class,

    ),
```

Add the following environment values to your `.env` file:

```

GEO_SERVICE=google                      # Valid options are: google, mapquest
GEO_GOOGLE_API_KEY=your_api_key         # Only required when using Google for geo coding
GEO_MAPQUEST_API_KEY=your_api_key       # Only required when using MapQuest for geo coding

```

By default, the package will use the Google API.

### Lumen 5.\* integration

[](#lumen-5-integration)

In your `bootstrap/app.php`, make sure you've un-commented the following line (around line 26):

```
$app->withFacades();

```

Then, register your class alias:

```
class_alias('Ixudra\Geo\Facades\Geo', 'Geo');

```

Finally, you have to register your ServiceProvider (around line 70-80):

```
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/

// $app->register('App\Providers\AppServiceProvider');

// Package service providers
$app->register(Ixudra\Geo\GeoServiceProvider::class);

```

Usage
-----

[](#usage)

### Geocoding

[](#geocoding)

Once you've installed the package, you can start using it in your code:

```
    use Ixudra\Geo\Facades\Geo;

    $response = Geo::geocode('Mersenhovenstraat 5, 3722 Kortessem');

    // Will return the following response:
    //
    // {
    //     "status": "success"
    //     "lat": 50.8565248
    //     "lng": 5.391962
    // }
```

> In order to use this feature, you will need to enable API access to the Google Maps API via the Google API console

If the GeoCoder instance could not find any results, it wil thrown an `Ixudra\Geo\Exceptions\EmptyResponseException`. If the GeoCoder instance encounters an error of some kind, an `Ixudra\Geo\Exceptions\ErrorResponseException` will be thrown:

### Distance calculation

[](#distance-calculation)

Once you've installed the package, you can start using it in your code:

```
    use Ixudra\Geo\Facades\Geo;

    $response = Geo::distance('Mersenhovenstraat 5, 3722 Wintershoven', 'Kempische Steenweg 293, 3500 Hasselt')

    // Will return the following response:
    //
    // {
    //      "status": "success"
    //      "distance": 13556       // in meters
    //      "duration": 1120        // in seconds
    // }
```

> In order to use this feature, you will need to enable API access to the Google Distance Matrix API via the Google API console

> Note: the distance calculation feature has not yet been implemented for MapQuest. Only the Google API service can be used at this point.

If the GeoCoder instance could not find any results, it wil thrown an `Ixudra\Geo\Exceptions\EmptyResponseException`.

That's all there is to it! Have fun!

License
-------

[](#license)

This template is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

Contact
-------

[](#contact)

Jan Oris (developer)

- Email:
- Telephone: +32 496 94 20 57

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 89.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~88 days

Recently: every ~184 days

Total

10

Last Release

3256d ago

Major Versions

5.1.3 → 6.0.02016-06-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/c441bf73a59ca680bb804e22e746002a07d1a44542e8c417a45317bc79b224d8?d=identicon)[Elimentz](/maintainers/Elimentz)

---

Top Contributors

[![elimentz](https://avatars.githubusercontent.com/u/1410811?v=4)](https://github.com/elimentz "elimentz (17 commits)")[![PhillippOhlandt](https://avatars.githubusercontent.com/u/3123549?v=4)](https://github.com/PhillippOhlandt "PhillippOhlandt (2 commits)")

---

Tags

laravelgeoIxudrageocode

### Embed Badge

![Health badge](/badges/ixudra-geo/health.svg)

```
[![Health](https://phpackages.com/badges/ixudra-geo/health.svg)](https://phpackages.com/packages/ixudra-geo)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[spatie/geocoder

Geocoding addresses to coordinates

8404.8M15](/packages/spatie-geocoder)[eseath/sypexgeo

A PHP package for working with the SypexGeo database file.

13176.3k](/packages/eseath-sypexgeo)[dive-be/laravel-geo

Translate IP addresses into geo locations

3710.5k](/packages/dive-be-laravel-geo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
