PHPackages                             lithiumdev/larageo-plugin - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. lithiumdev/larageo-plugin

ActiveLibrary[HTTP &amp; Networking](/categories/http)

lithiumdev/larageo-plugin
=========================

A Laravel package that uses geoPlugin web service to fetch information from an IP.

v1.1.2(5y ago)122.1k—10%MITPHPPHP &gt;=5.6.0

Since Nov 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/LithiumHosting/larageo-plugin)[ Packagist](https://packagist.org/packages/lithiumdev/larageo-plugin)[ RSS](/packages/lithiumdev-larageo-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (2)Versions (13)Used By (0)

[![](https://camo.githubusercontent.com/0c9d6c071c06ea29828dd4f0f7c080feedaffbfc2a95f47f183a565778592589/68747470733a2f2f6c69746869756d686f7374696e672e636f6d2f696d616765732f6c6f676f5f6e65775f626c61636b2e706e67)](https://camo.githubusercontent.com/0c9d6c071c06ea29828dd4f0f7c080feedaffbfc2a95f47f183a565778592589/68747470733a2f2f6c69746869756d686f7374696e672e636f6d2f696d616765732f6c6f676f5f6e65775f626c61636b2e706e67)

Laravel 5+ Geo IP Package
=========================

[](#laravel-5-geo-ip-package)

**from Lithium Hosting**
We're always open to pull requests, feel free to make this your own or help us make it better.

### Copyright

[](#copyright)

(c) Lithium Hosting, llc

### License

[](#license)

This library is licensed under the MIT license; you can find a full copy of the license itself in the file /LICENSE

### Requirements

[](#requirements)

- Laravel 5.2+
- php 5.5.9+
- Knowledge of Laravel and php

### Description

[](#description)

A Laravel package that uses [geoPlugin](http://www.geoplugin.com/webservices/json) web service to fetch information from an IP. It will store in cache the IP information and it will expire in 1 week.

---

### Installation

[](#installation)

Install this package through Composer. To your composer.json file, add:

```
    "lithiumdev/larageo-plugin": "~1.0"
```

Next, run the Composer update comand

```
$ composer update

```

Add the service provider to app/config/app.php, within the providers array.

```
    'providers' => array(
        // ...
        LithiumDev\LaraGeo\ServiceProvider::class,
    ),
```

In the same file `config/app.php` add the alias:

```
    'aliases' => array(
        //...
        'LaraGeo'   => LithiumDev\LaraGeo\Facade::class,
    ),
```

### Usage

[](#usage)

You can specify an IP:

```
    $info = LaraGeo::getInfo('177.34.13.248'); // get info from a IP
    var_dump($info);
```

Or use it without any param:

```
    $info = LaraGeo::getInfo(); // get info from the IP of the user accessing the page
    var_dump($info);
```

This is the output:

```
    object(stdClass)[155]
      public 'geoplugin_request' => string '177.34.13.248' (length=13)
      public 'geoplugin_status' => int 200
      public 'geoplugin_credit' => string 'Some of the returned data includes GeoLite data created by MaxMind, available from http://www.maxmind.com.' (length=145)
      public 'geoplugin_city' => string 'Campo Grande' (length=12)
      public 'geoplugin_region' => string 'Mato Grosso do Sul' (length=18)
      public 'geoplugin_areaCode' => string '0' (length=1)
      public 'geoplugin_dmaCode' => string '0' (length=1)
      public 'geoplugin_countryCode' => string 'BR' (length=2)
      public 'geoplugin_countryName' => string 'Brazil' (length=6)
      public 'geoplugin_continentCode' => string 'SA' (length=2)
      public 'geoplugin_latitude' => string '-20.450001' (length=10)
      public 'geoplugin_longitude' => string '-54.616699' (length=10)
      public 'geoplugin_regionCode' => string '11' (length=2)
      public 'geoplugin_regionName' => string 'Mato Grosso do Sul' (length=18)
      public 'geoplugin_currencyCode' => string 'BRL' (length=3)
      public 'geoplugin_currencySymbol' => string '&#82;&#36;' (length=10)
      public 'geoplugin_currencySymbol_UTF8' => string 'R$' (length=2)
      public 'geoplugin_currencyConverter' => float 2.383
```

Another useful example: You can also just return one field, e.g. city from in one call:

```
    $userCity = LaraGeo::getInfo()->geoplugin_city; // get the city from the user IP
    var_dump($userCity);
```

Output:

```
    string 'Campo Grande' (length=12)
```

### More info

[](#more-info)

If you want more info about the geoPlugin web service, [click here](http://www.geoplugin.com/webservices).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 55% 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 ~175 days

Recently: every ~208 days

Total

11

Last Release

1933d ago

PHP version history (3 changes)v1.0.0PHP &gt;=5.5.9

v1.0.4PHP &gt;=5.6.0

v1.1.1PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/20a605a84d2fd001ad68750f93812201d3fe0c8dc056e657580fae0562a16f80?d=identicon)[tsiedsma](/maintainers/tsiedsma)

---

Top Contributors

[![tsiedsma](https://avatars.githubusercontent.com/u/2625597?v=4)](https://github.com/tsiedsma "tsiedsma (11 commits)")[![Fuhrmann](https://avatars.githubusercontent.com/u/1160365?v=4)](https://github.com/Fuhrmann "Fuhrmann (8 commits)")[![MichMich](https://avatars.githubusercontent.com/u/210954?v=4)](https://github.com/MichMich "MichMich (1 commits)")

---

Tags

laravelipinfogeoipPlugin

### Embed Badge

![Health badge](/badges/lithiumdev-larageo-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/lithiumdev-larageo-plugin/health.svg)](https://phpackages.com/packages/lithiumdev-larageo-plugin)
```

###  Alternatives

[adrianorosa/laravel-geolocation

Laravel Geo Location package to get details for a given IP Address

6593.3k1](/packages/adrianorosa-laravel-geolocation)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)[laragear/api-manager

Manage multiple REST servers to make requests in few lines and fluently.

161.8k](/packages/laragear-api-manager)

PHPackages © 2026

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