Zizaco / cep-consult by Zizaco

This package has the objective to consult the CEP within one or more web APIs that will retrieve the address of the given number.
2,544
22
3
Package Data
Maintainer Username: Zizaco
Maintainer Contact: zizaco@gmail.com (Zizaco Zizuini)
Package Create Date: 2013-07-24
Package Last Update: 2022-06-21
Language: PHP
License: MIT
Last Refreshed: 2024-04-23 03:02:09
Package Statistics
Total Downloads: 2,544
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 22
Total Watchers: 3
Total Forks: 76
Total Open Issues: 1

CepConsult (Laravel4 Package)


This package has the objective to consult the CEP within one or more web APIs that will retrieve the address of the given number. Esse pacote tem o objetivo de consultar o numero CEP em uma ou mais APIs web que irão retornar o endereço do numero dado.

Required setup

In the require key of composer.json file add the following

"zizaco/cep-consult": "dev-master"

Run the Composer update comand

$ composer update

In your config/app.php add 'Zizaco\CepConsult\ServiceProvider' to the end of the $providers array

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Zizaco\CepConsult\ServiceProvider',

),

Then at the end of config/app.php add 'CepConsult' => 'Zizaco\CepConsult\Facade' to the $aliases array

'aliases' => array(

    'App'        => 'Illuminate\Support\Facades\App',
    'Artisan'    => 'Illuminate\Support\Facades\Artisan',
    ...
    'CepConsult'    => 'Zizaco\CepConsult\Facade',

),

Now you are ready to go:

// Simply do
CepConsult::getAddress('13.015-904');

// Or
CepConsult::getAddress('13015904');