ampersa / safebrowsing-laravel
Laravel package wrapper for ampersa/safebrowsing
Installs: 1 951
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- ampersa/safebrowsing: ^0.1
This package is auto-updated.
Last update: 2024-10-19 20:01:09 UTC
README
A Laravel package wrapper for ampersa/safebrowsing.
Installation
Composer
$ composer require ampersa/safebrowsing-laravel
Include the Service Provider and Facade in your config/app.php
'providers' => [ ... Ampersa\SafeBrowsing\Laravel\SafeBrowsingServiceProvider::class, ... ]; ... 'aliases' => [ ... 'SafeBrowsing' => Ampersa\SafeBrowsing\Laravel\Facade\SafeBrowsing::class, ... ];
Now publish the configuration
$ php artisan vendor:publish --provider="Ampersa\SafeBrowsing\Laravel\SafeBrowsingServiceProvider"
Finally, ensure your Google SafeBrowsing API key is set. This can be set within config/safebrowsing.php
or via the SAFEBROWSING_API_KEY
environment variable.
For more information on Google SafeBrowsing API keys, please see https://developers.google.com/safe-browsing/v4/get-started
Usage
Basic Usage
use SafeBrowsing; ... $result = SafeBrowsing::listed('http://ianfette.org/'); // Returns: (bool) true
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request