2017 © Pedro Peláez
 

library calling

telephone number

image

revolution/calling

telephone number

  • Friday, August 4, 2017
  • by revolution
  • Repository
  • 1 Watchers
  • 0 Stars
  • 236 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

電話番号からエリアを判定

Install

Composer

composer require revolution/calling

Laravel

Revolution\Calling\Providers\CallingServiceProvider::class,
'Calling' => Revolution\Calling\Facades\Calling::class,

使い方

use Revolution\Calling\Calling;

$calling = new Calling();

$area = $calling->area('09000000000');

//"携帯電話・PHS"

自分で用意した市外局番データを使う

use Revolution\Calling\Calling;

$calling = new Calling();

//一部入れ替え
$data = $calling->getNumber();
$data['0120'] = 'フリーダイヤル';

//全部なら配列で用意
$data = [];

$calling->setNumber($data);

$area = $calling->area('01200000');
//"フリーダイヤル"

Laravel

use Calling;

$area = Calling::area('090000');

市外局番データ

  • http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/shigai_list.html からWORD版ファイルをダウンロード。
  • コピペしたり変換したりしてnumber.csvを用意。
php data/convert.php

でnumber.jsonが作られる。, (*1)

LICENSE

MIT
Copyright kawax, (*2)

The Versions

04/08 2017

dev-master

9999999-dev

telephone number

  Sources   Download

MIT

The Requires

  • php ^5.6.4 || ^7.0

 

The Development Requires

by kawax

04/08 2017

0.1.1

0.1.1.0

telephone number

  Sources   Download

MIT

The Requires

  • php ^5.6.4 || ^7.0

 

The Development Requires

by kawax

11/08 2016

0.1.0

0.1.0.0

telephone number

  Sources   Download

MIT

The Development Requires

by kawax