amstr1k / yii2-geography
带有GEONAMES国家和城市的地理模块
dev-master
2015-01-18 19:37 UTC
Requires
- ext-zlib: >=1.1.0
- kartik-v/yii2-widget-select2: *
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-24 01:51:19 UTC
README
安装
安装此扩展的首选方法是使用 composer。
运行以下命令之一:
php composer.phar require --prefer-dist amstr1k/yii2-geography "*"
或将以下内容添加到您的 composer.json
文件的 require 部分:
"amstr1k/yii2-geography": "*"
to the require section of your composer.json
file.
配置
将 yii2-geography 添加到每个应用配置的模块部分
'modules' => [ 'geography' => [ 'class' => 'amstr1k\geography\Module' ], ]
将 yii2-geography 添加到控制台配置
'geonames-integration'=>[ 'class'=>'amstr1k\geography\commands\GeoNamesController' ],
使用控制台命令应用迁移
yii migrate --migrationPath=@amstr1k/geography/migrations
运行命令导入国家和城市
yii geonames-integration