sukohi/laravel-jp-postal-code
Larablocks Analysis
sukohi/laravel-jp-postal-code works with Laravel 5 and 6 (latest release 1.0.1, Dec 10, 2019), all past end of life (the last on Sep 6, 2022): no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5 and 6, past end of life since Sep 6, 2022
- No release in the last 12 months (last: Dec 10, 2019)
- 0 downloads a month (needs 10,000)
- 3 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Dec 10, 2019.
- No releases in the last 12 months.
- First released: Dec 10, 2019.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 30, 2026.
| Install | |
|---|---|
composer require sukohi/laravel-jp-postal-code |
|
| Latest Version: | 1.0.1 |
| Laravel: | 5 · 6 |
| License: | MIT |
| Last Updated: | Dec 10, 2019 |
| Links: | GitHub · Packagist |
laravel-jp-postal-code
A Laravel package that allows you to search address with Japanese postal code.
(This package is maintained under Laravel 5.7.)
Installation
Run the following command.
composer require sukohi/laravel-jp-postal-code:1.*
Preparation
The migration file is automatically loaded.
So just run this command.
php artisan migrate
And download "ken_all.zip" from the below by clicking "全国一括".
Set a csv file in /storage/app/csv/KEN_ALL.CSV after unzip.
Now the time to import postal data.
Run this command.
php artisan import:jp-postal-code
Note: Import takes time because the csv file has over 120,000 lines.
Configuration
If you'd like to configure, publish jp_postal_code.php.
php artisan vendor:publish --provider="Sukohi\LaravelJpPostalCode\LaravelJpPostalCodeServiceProvider"
Now you have jp_postal_code.php in /config folder.
endpoint
This is URL that provides feature of address search.
So you can search Japanese address as follows though Ajax.
- /api/jp_postal_code?code=131-0045
- /api/jp_postal_code?first_code=131&last_code=0045
Multi-byte character like "1310045" is also available.
[Response example]
{
address: "押上"
city: "墨田区"
first_code: "131"
full_address: "〒131-0045 東京都墨田区押上"
full_code: "131-0045"
id: 39342
last_code: "0045"
prefecture: "東京都"
}
- You can change format of
full_addressandfull_codein/config/jp_postal_code.php.
import_path
The path of "KEN_ALL.CSV".
address_format
The format of full_address when retrieving address.
postal_code_format
The format of full_code when retrieving address.
License
This package is licensed under the MIT License. Copyright 2019 Sukohi Kuhoh
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| 1.0.1 | ^5.7| | MIT | |
| 1.0.0 | ^5.7| | MIT |