Download the PHP package juststeveking/laravel-postcodes without Composer
On this page you can find all versions of the php package juststeveking/laravel-postcodes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download juststeveking/laravel-postcodes
More information about juststeveking/laravel-postcodes
Files in juststeveking/laravel-postcodes
Package laravel-postcodes
Short Description A service wrapper around postcodes.io
License MIT
Homepage https://github.com/JustSteveKing/LaravelPostcodes
Informations about the package laravel-postcodes
![](laravel-postal-code-validation.png)
LaravelPostcodes
A service wrapper around postcodes.io with validation rule and macro
Install
Via Composer
After installation, merge configuration for services using:
If, for some reason, this doesn't work please use the following steps:
-
Add the following into the
config/services.php
configuration file: - Add
POSTCODES_URL
to your.env
file and addhttps://api.postcodes.io/
as the value.
Basic Usage
You can use the validation rule:
Or you can use the validation Macro:
If you want to interact with the service itself:
Or use the facade:
Validate
Validate Postcode
Get Postcode information
Bulk Lookup Postcodes
Get nearest postcodes for a given longitude & latitude
Nearest postcodes for postcode
Autocomplete a postcode partial
Query for postcode
Lookup terminated postcode
Lookup Outward Code
Nearest outward code for outward code
Get nearest outward codes for a given longitude & latitude
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Steve McDougall
- All Contributors
- Laravel News for the artwork
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-postcodes with dependencies
guzzlehttp/guzzle Version ^6.3|^7.0
illuminate/support Version ~5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0