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

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');

市外局番データ

php data/convert.php

でnumber.jsonが作られる。

LICENSE

MIT
Copyright kawax