ozoriotsn/opencep

1.0.0 2024-02-27 15:33 UTC

This package is auto-updated.

Last update: 2024-11-27 17:07:12 UTC


README

Logo

OpenCEP PHP SDK

Free webservice for search zip code address in all brazil locations

Latest Version on Packagist Software License

Installation

Composer install

composer require ozoriotsn/opencep

Usage

<?php
    require __DIR__ . '/vendor/autoload.php';
    
    use Ozoriotsn\OpenCep\OpenCep;

    $opencep = OpenCep::class;
    $zipCodeAddress = $opencep::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"
    }
    */

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.

Credits