dungphanxuan/yii2-vnlocation

为 Yii2 定制的灵活越南位置模块

安装: 148

依赖项: 0

建议: 0

安全性: 0

星星: 9

关注者: 2

分支: 2

开放问题: 2

类型:yii2-extension

1.0 2017-08-22 01:24 UTC

This package is not auto-updated.

Last update: 2024-09-18 05:43:41 UTC


README

Yii 2 越南位置


要求

  • yii2-widget-depdrop
  • yii2-widget-select2

安装

安装此扩展的首选方式是通过 composer

或者运行

php composer.phar require  dungphanxuan/yii2-vnlocation=dev-master

或者将以下内容添加到 composer.json 的 require 部分。

"dungphanxuan/yii2-vnlocation": "@dev"

然后初始化迁移以设置表

yii migrate --migrationPath=@vendor/dungphanxuan/yii2-vnlocation/migrations

  • 配置

注意:请确保您配置文件中没有 go 组件配置。

将以下行添加到您的主配置文件中

导入数据

'modules' => [
    'go' => [
        'class' => 'dungphanxuan\vnlocation\Module',
    ],
],

填充控制台配置

运行

'controllerMap' => [
        'location-import' => [
            'class' => \dungphanxuan\vnlocation\commands\ImportController::className(),
        ],
    ],

示例位置

# Process and exit on finish
./yii location-import

访问路由 /go/demo-location 以查看结果

待办事项

初始化迁移

  • 初始化区域
  • 初始化城市
  • 初始化区
  • 初始化街道
  • 初始化社区
  • 播种数据

屏幕截图

示例图片