2017 © Pedro Peláez
 

yii2-extension yii2-region

Yii2中国省市区三级联动

image

rowe/yii2-region

Yii2中国省市区三级联动

  • Thursday, August 3, 2017
  • by Rowe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-region

This is an Yii2 widget for Chinese region list field. (https://github.com/rowe/yii2-region), (*1)

Demo

image, (*2)

Installation

Add to composer.json file with:, (*3)

"rowe/yii2-region": "dev-master"

Configuration

Copy the @rowe/yii2-region/src/migrations/m170621_032947_region.php to the migration folder like console/migrations. Run, (*4)

"Yii migrate"

The region codes would be inserted via Yii migration, (*5)

Usage

Firstly, bind the behavior to your model which need to use the region fields., (*6)

public function behaviors()
{
    return [
        'RegionBehavior' => [
            'class' => RegionBehavior::className(),
        ]
    ];
}

And then, use the widget in the view., (*7)

<?= RegionWidget::widget(['model' => $model]);?>

The Versions

03/08 2017

dev-master

9999999-dev

Yii2中国省市区三级联动

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar Rowe

yii2 city district region province

03/08 2017

v1.0

1.0.0.0

Yii2中国省市区三级联动

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar Rowe

yii2 city district region province