dev-master
9999999-dev https://github.com/Rowe/yii2-region-moduleYii2 file/image upload behavior for ActiveRecord
MIT
The Requires
- php >=5.4.0
- yiisoft/yii2 *
by Vinnie Rowe
upload behavior resize thumb region droplist
Yii2 file/image upload behavior for ActiveRecord
This is an Yii2 widget for Chinese region list field. (https://github.com/rowe/yii2-region), (*1)
, (*2)
Add to composer.json file with:, (*3)
"rowe/yii2-region": "dev-master"
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)
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]);?>
Yii2 file/image upload behavior for ActiveRecord
MIT
upload behavior resize thumb region droplist