ozoriotsn / viacep
ViaCep SDK for PHP
1.0.0
2024-01-05 12:54 UTC
Requires
- php: ~8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.7
Requires (Dev)
- phpunit/phpunit: ^10.5
README
VIACEP PHP SDK
Free webservice for search zip code address in all brazil locations
Installation
Composer install
composer require ozoriotsn/viacep
Usage
<?php require __DIR__ . '/vendor/autoload.php'; use Ozoriotsn\ViaCep\ViaCep; $viacep = ViaCep::class; $zipCodeAddress = $viacep::findByCep('01001-000')->toJson(); echo ($zipCodeAddress); /******************** * Return address ******************** { "cep": "01001-000", "logradouro": "Praça da Sé", "complemento": "lado Impar", "bairro": "Sé", "localidade": "São Paulo", "uf": "SP", "ibge": "3550308", "gia": "1004", "ddd": "11", "siafi": "7107", "fill": null } */
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
./vendor/bin/phpunit/ tests
Contributing
Please see CONTRIBUTING
License
The MIT License (MIT). Please see License File for more information.