Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jansenfelipe committed Apr 1, 2015
1 parent a3cb00b commit 91c1885
Showing 1 changed file with 4 additions and 32 deletions.
36 changes: 4 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,16 @@ Com esse pacote você poderá realizar consultas de CEP no site dos correios gra

### Para utilizar

Adicione no seu arquivo `composer.json` o seguinte registro na chave `require`
### Como usar

"jansenfelipe/cep-gratis": "2.0.*@dev"
Adicione a library

Execute

$ composer update
$ composer require jansenfelipe/cep-gratis

Adicione o autoload.php do composer no seu arquivo PHP.

require_once 'vendor/autoload.php';

Agora basta chamar o metodo consultar($cep)

use JansenFelipe\CepGratis\CepGratis as CepGratis;
$endereco = CepGratis::consultar('31030080');

### Frameworks

##### (Laravel)

Abra seu arquivo `config/app.php` e adicione `'JansenFelipe\CepGratis\CepGratisServiceProvider'` ao final do array `$providers`

'providers' => array(

'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
...
'JansenFelipe\CepGratis\CepGratisServiceProvider',
),

Adicione também `'CepGratis' => 'JansenFelipe\CepGratis\Facade'` no final do array `$aliases`

'aliases' => array(

'App' => 'Illuminate\Support\Facades\App',
'Artisan' => 'Illuminate\Support\Facades\Artisan',
...
'CepGratis' => 'JansenFelipe\CepGratis\Facade',

),
$endereco = JansenFelipe\CepGratis\CepGratis::consultar('31030080');

0 comments on commit 91c1885

Please sign in to comment.