codetyme/postal

Laravel indian postal code package.

1.0.3 2022-10-11 09:00 UTC

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

www.postalpincode.in


License

The MIT License (MIT). Please see License File for more information.