PHPackages                             shibuyakosuke/laravel-postalcode-japan - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shibuyakosuke/laravel-postalcode-japan

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shibuyakosuke/laravel-postalcode-japan
======================================

郵便番号データを取り込んで住所マスタを作成します。

2.0.5(2y ago)105.2k5MITPHPCI passing

Since Mar 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ShibuyaKosuke/laravel-postalcode-japan)[ Packagist](https://packagist.org/packages/shibuyakosuke/laravel-postalcode-japan)[ RSS](/packages/shibuyakosuke-laravel-postalcode-japan/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (16)Used By (0)

laravel-postalcode-japan
========================

[](#laravel-postalcode-japan)

[郵便番号データ](https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip)を取り込んで住所マスタを作成します。

Install
-------

[](#install)

```
composer require shibuyakosuke/laravel-postalcode-japan

```

Setup
-----

[](#setup)

マイグレーションを実行します。

```
php artisan migrate

```

postal\_codes, cities, prefectures テーブルが作成されます。

```
php artisan postalcode:update

```

を実行すると、自動的に[郵便番号データ](https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip)をダウンロードし、 各テーブルにデータを投入します。同じコマンドを再度実行しても、cities, prefectures のデータは updateOrCreate() で更新されます。

また、テスト環境などで全都道府県のデータまでは不要な場合、`--test` オプションをつけて実行することで、東京都のデータのみを投入することもできます。

Usage
-----

[](#usage)

あらかじめルートが設定されており、`ajax/prefectures/` にアクセスすると都道府県の一覧、`ajax/cities/{prefecture}`にアクセスすると市区町村の一覧をJSONデータで取得することができます。

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~105 days

Recently: every ~138 days

Total

14

Last Release

880d ago

Major Versions

1.1.3 → 2.0.02022-04-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7816825?v=4)[Kosuke Shibuya](/maintainers/ShibuyaKosuke)[@ShibuyaKosuke](https://github.com/ShibuyaKosuke)

---

Top Contributors

[![ShibuyaKosuke](https://avatars.githubusercontent.com/u/7816825?v=4)](https://github.com/ShibuyaKosuke "ShibuyaKosuke (24 commits)")

---

Tags

citieslaravellaravel-packagemigrationprefecture

### Embed Badge

![Health badge](/badges/shibuyakosuke-laravel-postalcode-japan/health.svg)

```
[![Health](https://phpackages.com/badges/shibuyakosuke-laravel-postalcode-japan/health.svg)](https://phpackages.com/packages/shibuyakosuke-laravel-postalcode-japan)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ronasit/laravel-helpers

Provided helpers function and some helper class.

1475.7k13](/packages/ronasit-laravel-helpers)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
