https://github.com/abr4xas/location
https://github.com/abr4xas/location
cities country hacktoberfest laravel laravel-package neighborhood
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/abr4xas/location
- Owner: abr4xas
- License: mit
- Created: 2020-10-17T20:15:40.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-09T19:57:39.000Z (about 2 years ago)
- Last Synced: 2024-10-11T11:30:25.505Z (about 1 year ago)
- Topics: cities, country, hacktoberfest, laravel, laravel-package, neighborhood
- Language: PHP
- Homepage: https://packagist.org/packages/abr4xas/location
- Size: 61.5 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Import states > cities > neighborhood
[](https://packagist.org/packages/abr4xas/location)
[](https://github.com/abr4xas/location/actions?query=workflow%3Arun-tests+branch%3Amaster)
[](https://packagist.org/packages/abr4xas/location)Import states > cities > neighborhood from specific country.
## Installation
You can install the package via composer:
```bash
composer require abr4xas/location
```You can publish and run the migrations with:
```bash
php artisan vendor:publish --provider="Abr4xas\Location\LocationServiceProvider" --tag="location-migrations"
php artisan migrate
```
## Usage``` bash
php artisan import:states-from AR
php artisan import:cities
php artisan import:neighborhoods
```> NOTE: You need to generate an access token. You can do that here.
country list:
```
country: AR,
name: Argentina,
country: BO,
name: Bolivia,
country: BR,
name: Brasil,
country: CL,
name: Chile,
country: CN,
name: China,
country: CO,
name: Colombia,
country: CR,
name: Costa Rica,
country: CBT,
name: Cross Border Trade,
country: EC,
name: Ecuador,
country: SV,
name: El Salvador,
country: GT,
name: Guatemala,
country: HN,
name: Honduras,
country: MX,
name: Mexico,
country: NI,
name: Nicaragua,
country: PA,
name: Panamá,
country: PY,
name: Paraguay,
country: PE,
name: Peru,
country: PT,
name: Portugal,
country: PR,
name: Puerto Rico,
country: GB,
name: Reino Unido,
country: DO,
name: República Dominicana,
country: UY,
name: Uruguay,
country: VE,
name: Venezuela,
```## Testing
``` bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Credits
- [angel cruz](https://github.com/abr4xas)
- [All Contributors](../../contributors)> I'm using Mercado Libre API for this package. Kudos to all MeLi devs <3
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.