PHP code example of celsonery / laravel-brasilapi
1. Go to this page and download the library: Download celsonery/laravel-brasilapi 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/ */
celsonery / laravel-brasilapi example snippets
return [
base_url => env('BASE_URL', 'https://brasilapi.com.br/api')
];
use CelsoNery\BrasilApi\Facades\BrasilApi;
$response = BrasilApi::cep('00100001');
return $response;
use CelsoNery\BrasilApi\BrasilApiService;
public function index(BrasilApiService $service)
{
return $service->cep('00100001');
}
bash
php artisan brasilapi:install
bash
php artisan vendor:publish --tag="brasilapi-config"