revolution / calling
This package is abandoned and no longer maintained.
No replacement package was suggested.
telephone number
0.1.1
2017-08-04 05:15 UTC
Requires
- php: ^5.6.4 || ^7.0
Requires (Dev)
- illuminate/support: 5.*
- phpunit/phpunit: ^5.7 || ^6.0
This package is auto-updated.
Last update: 2020-10-27 07:28:19 UTC
README
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が作られる。
LICENSE
MIT
Copyright kawax