2017 © Pedro Peláez
 

yii2-extension yii2-region-module

Yii2 file/image upload behavior for ActiveRecord

image

rowe/yii2-region-module

Yii2 file/image upload behavior for ActiveRecord

  • Friday, October 28, 2016
  • by Rowe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 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

28/10 2016

dev-master

9999999-dev https://github.com/Rowe/yii2-region-module

Yii2 file/image upload behavior for ActiveRecord

  Sources   Download

MIT

The Requires

 

upload behavior resize thumb region droplist