mm-regions-cities

所属分类:汇编语言
开发工具:PHP
文件大小:0KB
下载次数:0
上传日期:2020-04-21 05:57:19
上 传 者sh-1993
说明:  no intro
(Myanmar regions _and_ cities data)

文件列表:
CHANGELOG.md (746, 2020-04-20)
LICENSE (1066, 2020-04-20)
composer.json (610, 2020-04-20)
database/ (0, 2020-04-20)
database/migrations/ (0, 2020-04-20)
database/migrations/2020_04_14_102119_create_regions_table.php (805, 2020-04-20)
database/migrations/2020_04_14_102134_create_cities_table.php (694, 2020-04-20)
publishable/ (0, 2020-04-20)
publishable/config/ (0, 2020-04-20)
publishable/config/mmrc.php (732, 2020-04-20)
publishable/imports/ (0, 2020-04-20)
publishable/imports/mmrc_cities.csv (3992, 2020-04-20)
publishable/imports/mmrc_regions.csv (737, 2020-04-20)
publishable/storage/ (0, 2020-04-20)
publishable/storage/mmrc_cities.json (37632, 2020-04-20)
publishable/storage/mmrc_regions.json (3183, 2020-04-20)
routes/ (0, 2020-04-20)
routes/api.php (690, 2020-04-20)
routes/web.php (211, 2020-04-20)
src/ (0, 2020-04-20)
src/Facades/ (0, 2020-04-20)
src/Facades/Mmrc.php (290, 2020-04-20)
src/Http/ (0, 2020-04-20)
src/Http/Controllers/ (0, 2020-04-20)
src/Http/Controllers/Api/ (0, 2020-04-20)
src/Http/Controllers/Api/MmrcController.php (5697, 2020-04-20)
src/Http/Controllers/MmrcController.php (298, 2020-04-20)
src/MmrcServiceProvider.php (1380, 2020-04-20)
src/Models/ (0, 2020-04-20)
src/Models/City.php (732, 2020-04-20)
src/Models/Region.php (1012, 2020-04-20)
src/Transformers/ (0, 2020-04-20)
src/Transformers/CityCollection.php (824, 2020-04-20)
src/Transformers/CityResource.php (951, 2020-04-20)
src/Transformers/RegionCollection.php (830, 2020-04-20)
src/Transformers/RegionResource.php (1100, 2020-04-20)

# mm-regions-cities API for Myanmar regions and cities data ## Notes Created for Laravel 6.0 and above. A very simple and basic package that provides APIs to get Regions and Cities from Myanmar country. I am sure anyone with basic Laravel and package knowledge will understand (or anyone with PHP experience). After installation you can retrieve the data by REST APIs. By default, the data are retrieved from Json files. However you can change the setting in config and try to retrieve from database. --- ## Installation 1. Run `composer require mrlinnth/mm-regions-cities` 2. Run `php artisan vendor:publish --tag=mmrc` 3. Done **To retrieve data from database** 4. Run `php artisan migrate` 5. Import the two csv files found in your `storage/app/vendor/mmrc` 6. Update `config/mmrc.php` with `'use_json' => false` 7. Run `php artisan config:cache` ## Usage 1. Access `{APP_URL}/api/mmrc` to get all data 2. Access `{APP_URL}/api/mmrc/regions` to get all regions 3. Access `{APP_URL}/api/mmrc/regions/{region_id}` to get specific region data 4. Access `{APP_URL}/api/mmrc/cities` to get all cities 5. Access `{APP_URL}/api/mmrc/cities/{city_id}` to get specific city data ![](https://i.imgur.com/TgLEHsF.png) ![](https://i.imgur.com/zV2E6i1.png) ![](https://i.imgur.com/WYZhMVC.png) --- ### To Do -[ ] vuejs dropdown component -[ ] CRUD for city ### Do not want a Laravel package - there are csv files and json files in `publishable` folder. Download and use as you like. ### Do not want to use Laravel 6.0 - Fork and change the illuminate version in `composer.json` to your Laravel version. ### References I have used the data from following links. I have added 4,5 missing cities but I am sure there are many more missing. So anyone is welcome to update the cities data. - [https://en.wikipedia.org/wiki/List_of_cities_and_largest_towns_in_Myanmar](https://en.wikipedia.org/wiki/List_of_cities_and_largest_towns_in_Myanmar) - [https://en.wikipedia.org/wiki/Administrative_divisions_of_Myanmar](https://en.wikipedia.org/wiki/Administrative_divisions_of_Myanmar)

近期下载者

相关文件


收藏者