PHPackages                             freezon/sypexgeo - 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. freezon/sypexgeo

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

freezon/sypexgeo
================

Supports GeoIP services (sypexgeo.net).

0.12(2y ago)11.1k1BSD-2-ClausePHPPHP &gt;=8.1

Since May 8Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Freezon/sypexgeo)[ Packagist](https://packagist.org/packages/freezon/sypexgeo)[ RSS](/packages/freezon-sypexgeo/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (1)Versions (17)Used By (0)

GeoIP for Laravel 6+ with auto discover
=======================================

[](#geoip-for-laravel-6-with-auto-discover)

---

The data comes from a database and from service

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

[](#installation)

- [SypexGeo for Laravel 6+ on Packagist](https://packagist.org/packages/freezon/sypexgeo)
- [SypexGeo for Laravel 6+ on GitHub](https://github.com/freezon/sypexgeo)

To get the latest version of SypexGeo simply require it in your `composer.json` file.

```
$ composer require freezon/sypexgeo

```

for Laravel 5.5+

```
$ composer require freezon/sypexgeo:0.8.7

```

### Publish the configurations

[](#publish-the-configurations)

Run this on the command line from the root of your project:

```
$ php artisan vendor:publish --provider="Freez0n\SypexGeo\SypexGeoServiceProvider"

```

A configuration file will be publish to `config/sypexgeo.php`

Usage
-----

[](#usage)

Getting the location data for a given IP:

```
$location = \SypexGeo::get('232.223.11.11');
```

OR

```
use Freez0n\SypexGeo\SypexGeo;

...

$location = SypexGeo::get('232.223.11.11');

// empty get for get info by user ip
$location = SypexGeo::get();

// for get city, region or country
$city = SypexGeo::getCity([$ip = '']);
$city = SypexGeo::getRegion([$ip = '']);
$city = SypexGeo::getCountry([$ip = '']);

//for get names only
$city = SypexGeo::getLocationNames([$ip = ''], [$lang = 'ru' or 'en']);
```

### Example Data

[](#example-data)

If data is received from the database - config/sypexgeo.php ('type' =&gt; 'database')

```
        [
            'city' => [
                'id' => 524901,
                'lat' => 55.75222,
                'lon' => 37.61556,
                'name_ru' => 'Москва',
                'name_en' => 'Moscow',
                'okato' => '45',
            ],
            'region' => [
                'id' => 524894,
                'lat' => 55.76,
                'lon' => 37.61,
                'name_ru' => 'Москва',
                'name_en' => 'Moskva',
                'iso' => 'RU-MOW',
                'timezone' => 'Europe/Moscow',
                'okato' => '45',
            ],
            'country' => [
                'id' => 185,
                'iso' => 'RU',
                'continent' => 'EU',
                'lat' => 60,
                'lon' => 100,
                'name_ru' => 'Россия',
                'name_en' => 'Russia',
                'timezone' => 'Europe/Moscow',
            ],
        ];
```

If data is received from the webservice - config/sypexgeo.php ( 'type' =&gt; 'web\_service', 'view' =&gt; 'json' )

```
        [
              "ip" => "77.37.136.11"
              "city" => array [
                     "id" => 524901
                     "lat" => 55.75222
                     "lon" => 37.61556
                     "name_ru" => "Москва"
                     "name_en" => "Moscow"
                     "okato" => "45"
                     "vk" => 1
                     "population" => 10381222
                  ]
              "region" => array [
                    "id" => 524894
                    "lat" => 55.76
                    "lon" => 37.61
                    "name_ru" => "Москва"
                    "name_en" => "Moskva"
                    "iso" => "RU-MOW"
                    "timezone" => "Europe/Moscow"
                    "okato" => "45"
                    "auto" => "77, 97, 99, 177, 197, 199, 777"
                    "vk" => 0
                    "utc" => 3
              ]
              "country" => array [
                    "id" => 185
                    "iso" => "RU"
                    "continent" => "EU"
                    "lat" => 60
                    "lon" => 100
                    "name_ru" => "Россия"
                    "name_en" => "Russia"
                    "timezone" => "Europe/Moscow"
                    "area" => 17100000
                    "population" => 140702000
                    "capital_id" => 524901
                    "capital_ru" => "Москва"
                    "capital_en" => "Moscow"
                    "cur_code" => "RUB"
                    "phone" => "7"
                    "neighbours" => "GE,CN,BY,UA,KZ,LV,PL,EE,LT,FI,MN,NO,AZ,KP"
                    "vk" => 1
                    "utc" => 3
              ]
              "error" => ""
              "request" => -2
              "created" => "2015.04.08"
              "timestamp" => 1428516249
        ];
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 52.6% 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 ~125 days

Recently: every ~325 days

Total

16

Last Release

733d ago

PHP version history (4 changes)0.7PHP &gt;=7.1.3

0.9PHP &gt;=7.2

0.11.0PHP &gt;=8.0

0.12PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147082214?v=4)[Андрей Александров](/maintainers/FreeZ0n)[@Freez0n](https://github.com/Freez0n)

---

Top Contributors

[![scriptixru](https://avatars.githubusercontent.com/u/11806645?v=4)](https://github.com/scriptixru "scriptixru (10 commits)")[![Freezon](https://avatars.githubusercontent.com/u/4678813?v=4)](https://github.com/Freezon "Freezon (9 commits)")

---

Tags

laravelgeoiplaravel 9geolocationlocation

### Embed Badge

![Health badge](/badges/freezon-sypexgeo/health.svg)

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

###  Alternatives

[torann/geoip

Support for multiple Geographical Location services.

2.2k15.3M98](/packages/torann-geoip)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

19267.9k3](/packages/interaction-design-foundation-laravel-geoip)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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