laravel-road / ibge-locations
Laravel client to consume IBGE Locations api
v0.2.1
2021-01-11 21:13 UTC
Requires
- guzzlehttp/guzzle: ^7.2
- illuminate/http: ^8.21
- illuminate/support: ^8.0
Requires (Dev)
- orchestra/testbench: ^6.7
- phpunit/phpunit: ^9.5
README
Install
composer require laravel-road/ibge-locations php artisan ibge-locations:install // optional, but necessary to use the db driver
How to use
$states = Locations::getStates(); $cities = Locations::getStates($states->first()->initials);
Supported Drivers
- api (default)
- db
Env
- IBGE_LOCATIONS_DRIVER=api
- IBGE_LOCATIONS_BASEURL=https://servicodados.ibge.gov.br/api/v1/localidades
- IBGE_LOCATIONS_STATES_ORDERBY=name