gleisonnanet / cidades-gratis
使用此包,您可以免费在IBGE网站上查询城市。
Requires
- php: >=5.4.0
- ext-curl: *
- fabpot/goutte: 2.0.*@dev
Suggests
- jansenfelipe/cep-gratis: Permite consulta de CEP no site dos Correios
- jansenfelipe/cpf-gratis: Permite consulta de CPF no site da receita
- jansenfelipe/nfephp-serialize: Transforme NFe(xml) em objetos PHP e vice-versa
This package is auto-updated.
Last update: 2024-09-27 03:59:07 UTC
README
[](https://packagist.org.cn/packages/composer require gleisonnanet/cidades-gratis/cidades-gratis) [](https://packagist.org.cn/packages/composer require gleisonnanet/cidades-gratis/cidades-gratis) [](https://packagist.org.cn/packages/composer require gleisonnanet/cidades-gratis/cidades-gratis) 
使用此包,您可以免费在IBGE网站上查询城市。
如何使用
添加库
$ composer require composer require gleisonnanet/cidades-gratis/cidades-gratis
将composer的autoload.php文件添加到您的PHP文件中。
require_once 'vendor/autoload.php';
方法
查找州
使用方法getUfs()
来返回包含各自代码的州列表
$ufs = composer require gleisonnanet/cidades-gratis\CidadesGratis\Cidades::getUfs();
查找城市
使用方法getCidades()
来返回特定州中包含各自代码的城市列表
$cidades = composer require gleisonnanet/cidades-gratis\CidadesGratis\Cidades::getCidades(31);
查找城市详情
使用方法getCidadeDetalhes()
来返回特定城市的详细信息
$detalhes = composer require gleisonnanet/cidades-gratis\CidadesGratis\Cidades::getCidadeDetalhes(310620);
构建
在build/文件夹中存在两个文件:ufs.json和cidades.json。它们是在2015年8月20日生成的
喜欢吗?也了解一下
- [CnpjGratis](https://github.com/composer require gleisonnanet/cidades-gratis/cnpj-gratis)
- [CpfGratis](https://github.com/composer require gleisonnanet/cidades-gratis/cpf-gratis)
- [CepGratis](https://github.com/composer require gleisonnanet/cidades-gratis/cep-gratis)
- [NFePHPSerialize](https://github.com/composer require gleisonnanet/cidades-gratis/nfephp-serialize)
许可证
MIT许可证(MIT)