Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amstr1k/yii2-geography
https://github.com/amstr1k/yii2-geography
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/amstr1k/yii2-geography
- Owner: amstr1k
- Created: 2014-11-04T16:47:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-01-18T19:37:24.000Z (over 9 years ago)
- Last Synced: 2024-03-27T16:46:41.609Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 224 KB
- Stars: 14
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Lists
- list - amstr1k/yii2-geography - Extension to work with cities and countries from the database. (Extensions / Geo / Maps)
- list - amstr1k/yii2-geography - Extension to work with cities and countries from the database. (Extensions / Geo / Maps)
- awesome-yii - amstr1k/yii2-geography - extension to work with cities and countries from the database [Geonames](http://www.geonames.org/) (Extensions / Geo / Maps)
README
Geography module for Yii 2
========================================================Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist amstr1k/yii2-geography "*"
```or add
```
"amstr1k/yii2-geography": "*"
```to the require section of your `composer.json` file.
Configuration
-------------Add yii2-geography to module section of each application config:
```php
'modules' => [
'geography' => [
'class' => 'amstr1k\geography\Module'
],
]
```Add yii2-geography to console config:
```php
'geonames-integration'=>[
'class'=>'amstr1k\geography\commands\GeoNamesController'
],
```Apply migrations with console command
- `yii migrate --migrationPath=@amstr1k/geography/migrations`Run command to import countries and cities
- `yii geonames-integration`