Download the PHP package lsnepomuceno/laravel-brazilian-ceps without Composer
On this page you can find all versions of the php package lsnepomuceno/laravel-brazilian-ceps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download lsnepomuceno/laravel-brazilian-ceps
More information about lsnepomuceno/laravel-brazilian-ceps
Files in lsnepomuceno/laravel-brazilian-ceps
Download lsnepomuceno/laravel-brazilian-ceps
More information about lsnepomuceno/laravel-brazilian-ceps
Files in lsnepomuceno/laravel-brazilian-ceps
Vendor lsnepomuceno
Package laravel-brazilian-ceps
Short Description A package for querying zip codes for Brazilian addresses.
License MIT
Package laravel-brazilian-ceps
Short Description A package for querying zip codes for Brazilian addresses.
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-brazilian-ceps
Search addresses easily with Laravel Brazilian CEPs
Minimum requirements
- PHP: ^8.1, ^8.2 or ^8.3
- Laravel: 9, 10 or 11
- PHP Extensions: fileinfo, mbstring, json
Install
Require this package in your composer.json and update composer. This will download the package and the dependencies libraries also.
Export the settings file using the command below
Usage
Using CepService:
The returned value will have the structure below, see CepEntity:
:exclamation: By default, if the CEP is not found, the returned value will be null. If you need exception handling, the option can be enabled in the configuration file.
:exclamation: After setting the value of the "throw_not_found_exception" variable to true, remember to update your code:
Route API
By default, the package will provide an API route for looking up addresses, as specified below.
Verb | URI | Invokable Controller | Route Name |
---|---|---|---|
GET | api/consult-cep/{cep} | LSNepomuceno\LaravelBrazilianCeps\Controllers\ConsultCepController | consult-cep.api |
:exclamation: In some cases it may be necessary to deactivate this route, in which case just change the value of the "enable_api_consult_cep_route" configuration variable to false, as example below:
:exclamation: You can also change the message if the CEP is not found:
:exclamation: The initial middleware of the route is "guest", if it is necessary to modify it, just adjust the configuration file:
Cache Results
By default, the results cache are cached and have a lifetime of 30 days, if you need to disable or change the lifetime, just update the configuration variables, as described below.
Tests
To ensure the delivery of data, several public providers are used, with this, the need to standardize and apply tests for better code quality was seen. About 70+ tests are included in the package.
Tests can be verified through the badge
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-brazilian-ceps with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1 || ^8.2 || ^8.3
ext-json Version *
ext-fileinfo Version *
ext-mbstring Version *
illuminate/support Version ^9 || ^10 || ^11
illuminate/http Version ^9 || ^10 || ^11
guzzlehttp/guzzle Version ^7
ext-json Version *
ext-fileinfo Version *
ext-mbstring Version *
illuminate/support Version ^9 || ^10 || ^11
illuminate/http Version ^9 || ^10 || ^11
guzzlehttp/guzzle Version ^7
The package lsnepomuceno/laravel-brazilian-ceps contains the following files
Loading the files please wait ....