PHPackages                             yiier/yii2-china-region - 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. yiier/yii2-china-region

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

yiier/yii2-china-region
=======================

Yii2中国省市区三级联动

v1.1(7y ago)51571[1 issues](https://github.com/yiier/yii2-china-region/issues)BSD-4-ClausePHP

Since Jun 8Pushed 7y ago3 watchersCompare

[ Source](https://github.com/yiier/yii2-china-region)[ Packagist](https://packagist.org/packages/yiier/yii2-china-region)[ RSS](/packages/yiier-yii2-china-region/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

china region for Yii2
=====================

[](#china-region-for-yii2)

Yii2中国省市区街道四级联动

[![Latest Stable Version](https://camo.githubusercontent.com/0d7e28e56dd9c8bde38346b2a85eb67d0e92b68f5f9878e7bc17294ef9d807f3/68747470733a2f2f706f7365722e707567782e6f72672f79696965722f796969322d6368696e612d726567696f6e2f762f737461626c65)](https://packagist.org/packages/yiier/yii2-china-region)[![Total Downloads](https://camo.githubusercontent.com/eb5829859703f1d601196a08ba28cb03bf5c75ad1a496af8fe295a02447c9150/68747470733a2f2f706f7365722e707567782e6f72672f79696965722f796969322d6368696e612d726567696f6e2f646f776e6c6f616473)](https://packagist.org/packages/yiier/yii2-china-region)[![Latest Unstable Version](https://camo.githubusercontent.com/409ef5234bb14400834621d9a27065ca33611773bab212ab832f13502263be2c/68747470733a2f2f706f7365722e707567782e6f72672f79696965722f796969322d6368696e612d726567696f6e2f762f756e737461626c65)](https://packagist.org/packages/yiier/yii2-china-region)[![License](https://camo.githubusercontent.com/14d8179912595efd5a6adde75fc929fe5263206c2bf1f11ab94dcc3747d2e41d/68747470733a2f2f706f7365722e707567782e6f72672f79696965722f796969322d6368696e612d726567696f6e2f6c6963656e7365)](https://packagist.org/packages/yiier/yii2-china-region)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist yiier/yii2-china-region "*"

```

or add

```
"yiier/yii2-china-region": "*"

```

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

Migrations
----------

[](#migrations)

Run the following command

```
php yii migrate --migrationPath=@yiier/region/migrations/

```

配置
--

[](#配置)

在 controller 中添加以下 action

```
public function actions()
{
    $actions = parent::actions();
    $actions['get-region'] = [
        'class' => \yiier\region\RegionAction::className(),
    ];
    return $actions;
}
```

使用
--

[](#使用)

view 页面

```
