|Classes of Lucas Nepomuceno||Laravel Brazilian CEPs||readme.md||Download|
<h1 align="center">Search addresses easily with Laravel Brazilian CEPs</h1>
<p align="center"> <a href="https://github.com/lsnepomuceno/laravel-brazilian-ceps/releases/latest">
</a> <a href="https://packagist.org/packages/lsnepomuceno/laravel-brazilian-ceps/stats">
</a> <a href="https://github.com/lsnepomuceno/laravel-brazilian-ceps/tree/dev">
</a> <a href="https://github.com/lsnepomuceno/laravel-brazilian-ceps/blob/main/LICENSE.md">
</a> <a href="https://github.com/lsnepomuceno/laravel-brazilian-ceps/actions/workflows/main_action.yml">
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
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:
By default, the package will provide an API route for looking up addresses, as specified below.
: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:
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.
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.
The MIT License (MIT). Please see License File for more information.