Looking to hire Laravel developers? Try LaraJobs

ibge-locations maintained by laravel-road

Description
Laravel client to consume IBGE Locations api
Author
Last update
2021/01/12 01:30 (dev-master)
License
Links
Downloads
19

Comments
comments powered by Disqus

Laravel Road IBGE Locations

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