PHPackages                             kmergen/yii2-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. kmergen/yii2-location

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

kmergen/yii2-location
=====================

A Yii2 extension for location and address management

1171PHP

Since Jan 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kmergen/yii2-location)[ Packagist](https://packagist.org/packages/kmergen/yii2-location)[ RSS](/packages/kmergen-yii2-location/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii 2 Location
==============

[](#yii-2-location)

Yii2 extension to provide location management.

The preferred way to install this extension is through [composer](https://getcomposer.org/).

Either run

```
composer require "kmergen/yii2-location: "*"
```

or add

```
"kmergen/yii2-location": "*",

```

to the `require` section of your `composer.json` file.

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

[](#installation)

### 1. Run Migrations

[](#1-run-migrations)

Run `$ yii migrate --migrationPath=@vendor/kmergen/yii2-location/migrations`

Use Yii2-location with Yii2 basic template
==========================================

[](#use-yii2-location-with-yii2-basic-template)

Configure application
---------------------

[](#configure-application)

In your configuration file set the following:

```
'bootstrap' => [
    'kmergen\location\Bootstrap',
    ...
],
'modules' => [
    'location' => [
        'class' => 'kmergen\location\Module'
    ],
    ...
]
```

That's all. Yii-2 location is ready to go.

Use Yii2-location with Yii2 advanced template
=============================================

[](#use-yii2-location-with-yii2-advanced-template)

When using advanced template, you may have some special restrictions for frontend and backend.

Configure application
---------------------

[](#configure-application-1)

Let's start with defining module in `@common/config/main.php`:

```
'bootstrap' => [
    'kmergen\location\Bootstrap',
    ...
],
'modules' => [
    'location' => [
        'class' => 'kmergen\location\Module',
        // you will configure your module inside this file
        // or if need different configuration for frontend and backend you may
        // configure in needed configs
    ],
],
```

Restrict access to admin controller from frontend. Open `@frontend/config/main.php` and add following:

```
'modules' => [
    'location' => [
        // following line will restrict access to admin controller from frontend application
        'as frontend' => 'kmergen\location\filters\FrontendFilter',
    ],
],

```

Restrict access to frontend controller actions from backend. Open `@backend/config/main.php` and add the following:

```
'modules' => [
    'location' => [
        // following line will restrict access to actions of controller from backend
        'as backend' => 'kmergen\location\filters\BackendFilter',
    ],
],

```

That's all, now you have module installed and configured in advanced template.

> Note: This extension is under development. Use it not in production.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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://www.gravatar.com/avatar/1abad4359cfb0942018dcd3e28802c279d72ec3fa80148c4aad6eb2b76bb602c?d=identicon)[kmergen](/maintainers/kmergen)

---

Top Contributors

[![kmergen](https://avatars.githubusercontent.com/u/1640101?v=4)](https://github.com/kmergen "kmergen (10 commits)")

### Embed Badge

![Health badge](/badges/kmergen-yii2-location/health.svg)

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

###  Alternatives

[scriptua/magento2-quickview

Script QuickView Module

283.1k](/packages/scriptua-magento2-quickview)[aldesrahim/filament-compass

Comprehensive documentation for Filament v5, designed for LLMs and AI-assisted development.

111.6k](/packages/aldesrahim-filament-compass)

PHPackages © 2026

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