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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-brazilian-ceps

Search addresses easily with Laravel Brazilian CEPs

Latest Stable Version Total Downloads Latest Unstable Version License Tests

Minimum requirements

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 tests 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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lsnepomuceno/laravel-brazilian-ceps contains the following files

Loading the files please wait ....