Custom library for address search by brazilians cep or listing regions, states, cities and district, using postmon and ibge service
anselmojacyntho/carrier is a Laravel package for custom library for address search by brazilians cep or listing regions, states, cities and district, using postmon and ibge service.
It currently has 0 GitHub stars and 8 downloads on Packagist.
Install it with composer require anselmojacyntho/carrier.
Discover more Laravel packages by anselmojacyntho
or browse all Laravel packages to compare alternatives.
Last updated
The Carrier is a package for PHP and Laravel that provides integration with postmon and the IBGE api to allow searches of addresses by cep and listings of states, cities, neighborhoods and regions of Brazil.
Via Composer
Pull this package in through Composer.
{
"require": {
"anselmojacyntho/carrier": "dev-master"
}
}
or run in terminal:
composer require anselmojacyntho/carrier
Add the service provider to your config/app.php file:
'providers' => array(
//...
AnselmoJacyntho\Carrier\CarrierServiceProvider::class
),
Add the facade to your config/app.php file:
'aliases' => array(
//...
'Carrier' => AnselmoJacyntho\Carrier\Facades\Carrier::class
),
The package provides an easy interface for search address by CEP or litings regions, states, cities and neighborhoods from your application.
use AnselmoJacyntho\Carrier\Facades\Carrier;
// Get address by cep
$response = Carrier::findByCep('328947');
// Get all regions
$response = Carrier::getRegions();
// Get states by region id
$response = Carrier::getStatesByRegion(1);
// Get all states
$response = Carrier::getStates();
// Get all cities
$response = Carrier::getCities();
// Get city by state id
$response = Carrier::getCitiesByState(3);
// Get all district by city id
$response = Carrier::getDistrictsByCity(3550308);
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email author email instead of using the issue tracker.
license. Please see the license file for more information.