bhavinjr / laravel-postal
Retrive the indian post office details based on pincode
1.0
2021-07-02 18:27 UTC
Requires
- php: >=5.6.0
- guzzlehttp/guzzle: ^7.0.1
- illuminate/support: ^5.4 || ^6.0 || ^7.0 || ^8.0
This package is auto-updated.
Last update: 2024-10-29 06:00:23 UTC
README
A simple postal to get details of Post Office by searching Postal PIN Code or Post Office Branch Name of India for Laravel 5.|6.|7.|8.
Installation
First, you'll need to install the package via Composer:
$ composer require bhavinjr/laravel-postal
If you are don't use using Laravel 5.5.* Then, update config/app.php
by adding an entry for the service provider.
'providers' => [ // ... Bhavinjr\Postal\Providers\PostalServiceProvider::class, ]; 'aliases' => [ //... "Postal": "Bhavinjr\Postal\Facades\Postal", ];
Usage
The package gives you the following methods to use:
Get Post Office(s) details search by Postal PIN Code
Postal::findByCode()
use Postal; Postal::findByCode(380001);
Postal::findByBranch()
Get Post Office(s) details search by Post Office branch name
use Postal; Postal::findByBranch('Ahmedabad');