adenijiayocharles / identibyte-laravel
Identibyte.com API 的 Laravel 封装
1.0.2
2021-02-06 08:50 UTC
Requires
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2024-09-09 21:45:44 UTC
README
这是一个 Identibyte API 的封装。Identibyte 允许您识别和标记一次性电子邮件地址,以便为您公司节省资源,为真实用户服务。
安装
- 从 这里 获取 API 密钥
- 在 Laravel 应用程序的根目录中运行
composer require adenijiayocharles/identibyte-laravel:1.0.2
- 将以下内容添加到您的
.env
文件的底部
IDENTIBYTE_KEY={your-api-key}
- 通过运行以下命令发布配置文件
php artisan vendor:publish --provider='Adenijiayocharles\Identibyte\IdentibyteServiceProvider'
用法
要检查电子邮件地址是否为一次性电子邮件地址,请参阅以下示例
namespace App\Http\Controllers; use Adenijiayocharles\Identibyte\Identibyte; class TestController extends Controller { // returns the whole response from identibye public function test() { return Identibyte::check('test@email.com'); } // returns true if email is disposable and false if not public function checkEmail() { return Identibyte::isDisposableEmail('test@email.com'); } }
更多信息请访问 这里