New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

gabrielmoura/laravel-cep

A simple Laravel package to get CEP information
4,426 4
Install
composer require gabrielmoura/laravel-cep
Latest Version:1.0
PHP:^8.2
Laravel:4 – 10
License:MIT
Last Updated:May 5, 2024
Links: GitHub  ·  Packagist
Maintainer: gabrielmoura

Laravel CEP: A Robust CEP Lookup Package

A comprehensive Laravel package for fetching Brazilian zip code (CEP) information from multiple providers, offering seamless caching and flexibility.

Features

  • Multiple Providers: Integrates with:
  • Intelligent Caching: Streamlines performance with optional Redis caching.
  • Ease of Use: Simple interface via container or facade.
  • Customizable: Configure the preferred provider.

Installation

composer require gabrielmoura/laravel-cep

Configuration

Publish the configuration file (optional):

php artisan vendor:publish --provider="Gabrielmoura\LaravelCep\CepServiceProvider"

In your config/services.php, adjust the default provider if desired:

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

Strongly consider installing illuminate/redis for automatic caching.

Usage

Container:

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

Facade:

use Gabrielmoura\LaravelCep\Cep;
$cepData = Cep::find('01001000', true); // Enable caching

Compatibility

  • Laravel 10.x

Contributing

We welcome contributions! Please refer to our CONTRIBUTING.md

License

Laravel CEP is released under the MIT License.

Related Packages

namoshek/laravel-redis-sentinel

An extension of Laravels Redis driver which supports connecting to a Redis maste...

1,107,014 40
mmeyer2k/redistree

A clean Redis web interface for Laravel 5

629,555 9
cfernandez777/laravel-redis-sentinel

An extension of Laravels Redis driver which supports connecting to a Redis maste...

15,400 1
um-flint/laravel-multi-tenant-redis

Laravel package to allow for a better "cache:clear".

557 0
renatoneto/laravel4-cep

Consulta de CEP

10 1

Version History

Version Released PHP Laravel License
1.0 ^8.2 * MIT