devinpearson / binlist
laravel 中使用 binlist 的简单包。
v1.0.2
2019-06-09 09:47 UTC
Requires
- php: >=7.1.3
- guzzlehttp/guzzle: ^6.3
- illuminate/contracts: ^5.7
- illuminate/support: ^5.7
Requires (Dev)
- graham-campbell/analyzer: ^2.0
- graham-campbell/testbench: ^5.0
- mockery/mockery: ^1.0
- phpunit/phpunit: ^7.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-09-09 21:25:06 UTC
README
这是一个简单的包装器,通过 binlist.net 检查 binlist 代码,并将结果格式化为类型提示对象,使其更容易使用和引用结果。
安装
将依赖项添加到您的项目中
composer require devinpearson/binlist
Laravel 5.5+
如果您不使用自动发现,请将 ServiceProvider 添加到 config/app.php 中的 providers 数组
DevinPearson\BinList\BinListServiceProvider::class,
如果您想使用 facade 记录消息,请将以下内容添加到 app.php 中的 facades
'BinList' => DevinPearson\BinList\Facades\BinList::class,
用法
try { BinList::check($binNumber); } catch (\DevinPearson\BinList\BinListException $exception) { // do something with exception }
特性
- 为 binlist.net 创建了一个易于使用的 facade
要求
- PHP 7.1+
- 运行单元测试需要 PHPUnit
- 运行单元测试需要 Composer