PHPackages                             pantera-digital/yii2-geo-location - 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. pantera-digital/yii2-geo-location

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

pantera-digital/yii2-geo-location
=================================

Yii2 geo location module

2277PHP

Since Nov 29Pushed 7y ago3 watchersCompare

[ Source](https://github.com/pantera-digital/yii2-geo-location)[ Packagist](https://packagist.org/packages/pantera-digital/yii2-geo-location)[ RSS](/packages/pantera-digital-yii2-geo-location/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-geo-location
=================

[](#yii2-geo-location)

geo-location

### Установка

[](#установка)

Для начала нужно установить и настроить

```
composer require pantera-digital/yii2-geo-location "@dev"

```

### Настройка

[](#настройка)

Добавил в консольный конфиг путь до миграций

```
'controllerMap' => [
    'migrate' => [
        'class' => 'yii\console\controllers\MigrateController',
        'migrationPath' => [
            '@vendor/pantera-digital/yii2-geo-location/migrations',
        ],
    ],
],

```

Добавить в конфиг

```
'components' => [
    'geolocation' => [
        'class' => pantera\geolocation\components\Geolocation::className(),
    ],
    'ipgeobase' => [
        'class' => 'himiklab\ipgeobase\IpGeoBase',
        'useLocalDB' => true,
    ],
],
'modules' => [
    'geolocation' => [
        'class' => pantera\geolocation\Module::className(),
    ],
],

```

Добавить дефолтные города можно в таблицу geobase\_city\_popular

### Использование

[](#использование)

Вставка виджета

```

```

Определение города

```
Yii::$app->geolocation->identify()

```

Установить выбранный город по его id

```
Yii::$app->geolocation->set($id)

```

Получить выбранный город

```
Yii::$app->geolocation->get()

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 58.8% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/642519?v=4)[Alex Kostin](/maintainers/webmayak)[@webmayak](https://github.com/webmayak)

---

Top Contributors

[![Singletonn](https://avatars.githubusercontent.com/u/9639275?v=4)](https://github.com/Singletonn "Singletonn (10 commits)")[![webmayak](https://avatars.githubusercontent.com/u/642519?v=4)](https://github.com/webmayak "webmayak (7 commits)")

### Embed Badge

![Health badge](/badges/pantera-digital-yii2-geo-location/health.svg)

```
[![Health](https://phpackages.com/badges/pantera-digital-yii2-geo-location/health.svg)](https://phpackages.com/packages/pantera-digital-yii2-geo-location)
```

###  Alternatives

[crisu83/shortid

15125.2k6](/packages/crisu83-shortid)[mihaeu/html-formatter

HTML Formatter pritifies HTML content by applying proper intendation (no tidy, purification, etc.).

1770.8k4](/packages/mihaeu-html-formatter)

PHPackages © 2026

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