pkboom / laravel-spam-filter
dev-master
2020-08-10 03:32 UTC
Requires
- php: ^7.3
- spatie/laravel-honeypot: ^2.2
Requires (Dev)
- orchestra/testbench: ^5.2
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-11-10 13:00:32 UTC
README
Using a honeypot, you can easily filter spams. This package uses spatie/laravel-honeypot under the hood.
Installation
You can install the package via composer:
composer require pkboom/laravel-spam-filter
Usage
Place this in your form.
<form> <input name="honeypot" type="hidden" value="" /> <input name="encrypted_time" type="hidden" value="{{ \Spatie\Honeypot\EncryptedTime::create(now()->addSecond()) }}" /> ... </form>
Filter spams
use Illuminate\Support\Facades\Request; if (Request::isSpam()) { return response('', 400); }
Testing
composer test
License
The MIT License (MIT). Please see MIT license for more information.