awcodes / postal-codes
This is a package to easily install and use postal codes in your Laravel application from GeoNames.org
Requires
- php: ^8.3
- ext-zip: *
- maatwebsite/excel: ^4.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- rector/rector: ^2.0
- spatie/laravel-ray: ^1.26
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-09 19:09:25 UTC
README
This is a package to easily install and use postal codes in your Laravel application. All data is provided by GeoNames data dumps. You can see the available countries at https://download.geonames.org/export/zip/.
Installation & Usage
You can install the package via composer:
composer require awcodes/postal-codes
If you need to publish the migration you may do so with:
php artisan postal-codes:install
Then the only thing left to do is to seed your data. This can be done with the postal-codes:seed command.
php artisan postal-codes:seed {country=US}
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Development
Install dependencies:
composer install
Run the test suite:
composer test
Start the Workbench application:
composer serve
The Workbench is available at http://localhost:8000 with a small local postal-code dataset. It does not download data from GeoNames unless you explicitly run the seed command.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.