ampersa / safebrowsing-laravel
Laravel 对 ampersa/safebrowsing 的包装包
0.1
2017-04-13 14:54 UTC
Requires
- ampersa/safebrowsing: ^0.1
This package is auto-updated.
Last update: 2024-09-19 19:49:52 UTC
README
ampersa/safebrowsing 的 Laravel 包包装。
安装
Composer
$ composer require ampersa/safebrowsing-laravel
在您的 config/app.php
中包含服务提供者和外观
'providers' => [ ... Ampersa\SafeBrowsing\Laravel\SafeBrowsingServiceProvider::class, ... ]; ... 'aliases' => [ ... 'SafeBrowsing' => Ampersa\SafeBrowsing\Laravel\Facade\SafeBrowsing::class, ... ];
现在发布配置
$ php artisan vendor:publish --provider="Ampersa\SafeBrowsing\Laravel\SafeBrowsingServiceProvider"
最后,确保您的 Google SafeBrowsing API 密钥已设置。这可以在 config/safebrowsing.php
中设置,或者通过 SAFEBROWSING_API_KEY
环境变量进行设置。
有关 Google SafeBrowsing API 密钥的更多信息,请参阅 https://developers.google.com/safe-browsing/v4/get-started
使用方法
基本使用
use SafeBrowsing; ... $result = SafeBrowsing::listed('http://ianfette.org/'); // Returns: (bool) true
贡献
- 将其Fork!
- 创建您的功能分支:
git checkout -b my-new-feature
- 提交您的更改:
git commit -am '添加一些功能'
- 推送到分支:
git push origin my-new-feature
- 提交拉取请求