wdkta3/jp-area

laravel-jp-area

dev-master 2020-01-31 03:43 UTC

This package is auto-updated.

Last update: 2025-05-29 01:33:18 UTC


README

Installation

composer require wdkta3/jp-area

Usage

  • Get area
$hokkaido = JpArea\JpArea::get(1);
  • Check if whether the area exists
$exists = JpArea\JpArea::exists(1) // bool(true)
$exists = JpArea\JpArea::exists(9) // bool(false)
  • Get all areas
$areas = JpArea\JpArea::all();
  • Get area list
$areas = JpArea\JpArea::asList();
        Array
        (
            [1] => '北海道',
            [2] => '東北',
            [3] => '関東',
            [4] => '中部',
            [5] => '近畿',
            [6] => '中国',
            [7] => '四国',
            [8] => '九州',
        );