Download the PHP package sukohi/laravel-jp-postal-code without Composer

On this page you can find all versions of the php package sukohi/laravel-jp-postal-code. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-jp-postal-code

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.

  1. /api/jp_postal_code?code=131-0045
  2. /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: "東京都"
}

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


All versions of laravel-jp-postal-code with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^5.7|^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sukohi/laravel-jp-postal-code contains the following files

Loading the files please wait ....