Looking to hire Laravel developers? Try LaraJobs

laravel-spam-filter maintained by pkboom

Author
Last update
2020/08/10 05:32 (dev-master)
License
Downloads
0

Comments
comments powered by Disqus

Filter spams

Latest Stable Version Build Status Total Downloads

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.