codetyme / postal
Laravel indian postal code package.
1.0.3
2022-10-11 09:00 UTC
Requires
- guzzlehttp/guzzle: ^7.0.1
This package is auto-updated.
Last update: 2025-04-11 19:17:18 UTC
README
Laravel indian postal code package.
The term Postal Index Number (PIN) is popularly known as PIN code/Postal Code in India. It is a code in the post office number of the postal code system which is used in India Post for segregating the mails. The PIN code consists of six digits.
Requirements
PHP: ^7.3 or ^8.0
Laravel Framework
Quick Installation
composer require codetyme/postal:"^1.0"
How to use
In your controller
public static function FindByPincode(\Codetyme\Postal\Postal $postal){ return $postal->pin('400001'); }
public static function FindByPostOffice(\Codetyme\Postal\Postal $postal){ return $postal->branch('Mumbai'); }
API returns the response in JSON format. Status
field in response is set to SUCCESS
or ERROR
, Message
field will return message against the request and PostOffice
field will return data.
Thanks
License
The MIT License (MIT). Please see License File for more information.