New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

lithiumdev/larageo-plugin

A Laravel package that uses geoPlugin web service to fetch information from an IP.
25,314 1

Larablocks Analysis

lithiumdev/larageo-plugin works with Laravel 5 to 8 (latest release v1.1.2, Jan 31, 2021), all past end of life (the last on Jan 24, 2023): no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5 to 8, past end of life since Jan 24, 2023
  • No release in the last 12 months (last: Jan 31, 2021)
  • 258 downloads a month (needs 10,000)
  • 1 GitHub star (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Jan 31, 2021.
  • No releases in the last 12 months.
  • First released: Apr 19, 2016.
  • Monthly downloads: 258, down 46% from six months ago.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require lithiumdev/larageo-plugin
Latest Version:v1.1.2
PHP:>=5.6.0
Laravel:5 – 8
License:MIT
Last Updated:Jan 31, 2021
Links: GitHub  ·  Packagist
Maintainer: tsiedsma

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.

(c) Lithium Hosting, llc

License

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

Requirements

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

Description

A Laravel package that uses geoPlugin web service to fetch information from an IP. It will store in cache the IP information and it will expire in 1 week.


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

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 <a href=\'http://www.maxmind.com\'>http://www.maxmind.com</a>.' (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

If you want more info about the geoPlugin web service, click here.

Related Packages

adrianorosa/laravel-geolocation

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

116,306 66
matriphe/larinfo

Display system information (IP address, OS, versions) for Laravel.

43,772 47
bkhim/laravel-geolocation

Laravel geolocation with built-in fraud prevention, risk scoring, MFA triggers,...

1,079 1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338

Version History

Version Released PHP Laravel License
v1.1.2 >=5.6.0 >=5.0 MIT
v1.1.1 >=7.2.0 >=6.0 MIT
v1.1.0 >=5.6.0 ~5.0 MIT
1.0.6 >=5.6.0 ~5.0 MIT
v1.0.5 >=5.6.0 ~5.0 MIT