PHP code example of gabrielmoura / laravel-cep

1. Go to this page and download the library: Download gabrielmoura/laravel-cep library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gabrielmoura / laravel-cep example snippets


'cep' => [
   'endpoint' => \Gabrielmoura\LaravelCep\EndpointOption::POSTMON, // Example: Change to your preferred provider
],

use Gabrielmoura\LaravelCep\CepService;
$cepData = app(CepService::class)->find('01001000', true); // Enable caching

use Gabrielmoura\LaravelCep\Cep;
$cepData = Cep::find('01001000', true); // Enable caching
bash
php artisan vendor:publish --provider="Gabrielmoura\LaravelCep\CepServiceProvider"