Releases: ArvidDeJong/livewire-honeypot
Releases · ArvidDeJong/livewire-honeypot
v1.0.4 Added support for Laravel 13
Changed
- Added support for Laravel 13
v1.0.3
Changed
- Updated framework version constraints to support Laravel 12 and Livewire 4
v1.0.2 Patch
HasHoneypot mount patch
v1.0.1 config added
Added
- Configuration file with customizable settings:
minimum_fill_seconds(default: 5, was hardcoded to 3)field_name(default: hp_website)token_min_length(default: 10)token_length(default: 24)
- Multilingual support with English and Dutch translations
- Translation keys for error messages and honeypot label
- Config publishing with
--tag=livewire-honeypot-config - Translation publishing with
--tag=livewire-honeypot-translations - Environment variable support for all config options
Changed
- Minimum fill time increased from 3 to 5 seconds (configurable)
- Error messages now use translation keys instead of hardcoded strings
- Honeypot label text is now translatable
- Token length is now configurable (was hardcoded to 24)
Improved
- Updated README with configuration and translation documentation
- All hardcoded values moved to config file
v1.0.0 First release
darvis/livewire-honeypot
Lightweight honeypot + time‑trap protection for Livewire 3 (Laravel 11).
Blocks simple bots without CAPTCHAs, privacy‑friendly and unobtrusive.
Features
- 🪤 Honeypot bait field (
present|size:0) - ⏱️ Time‑trap (minimum fill time)
- 🧩 Works as Trait for Livewire and as Service for controllers/APIs
- 🧱 Blade component
<x-honeypot />for easy inclusion - 🔌 Zero dependencies beyond Livewire 3 / Laravel 11
Installation
composer require darvis/livewire-honeypot(For local development, you can add a path repository in your app's composer.json.)
Usage — Livewire (Trait)
- In your Livewire component:
use Darvis\LivewireHoneypot\Traits\HasHoneypot;
class ContactForm extends Component
{
use HasHoneypot;
public string $name = '';
public string $email = '';
public string $message = '';
public function submit(): void
{
$this->validate([
'name' => 'required|string|min:2',
'email' => 'required|email',
'message' => 'required|string|min:10',
]);
$this->validateHoneypot();
// process form ...
$this->reset(['name','email','message']);
$this->resetHoneypot();
}
}- In your Blade (or Flux) view, add the component (place anywhere inside the form):
<x-honeypot />Usage — Controller / API (Service)
use Darvis\LivewireHoneypot\Services\HoneypotService;
public function store(Request $request, HoneypotService $honeypot)
{
$honeypot->validate($request->only('hp_website', 'hp_started_at', 'hp_token'));
// process form ...
}To generate fields server‑side (non‑Livewire forms):
$hp = app(Darvis\LivewireHoneypot\Services\HoneypotService::class)->generate();
// pass $hp to your view to prefill hidden inputsPublishing the Blade view (optional)
php artisan vendor:publish --tag=livewire-honeypot-viewsThrottling (recommended)
Add request rate‑limiting on your form route:
Route::get('/contact', \App\Livewire\ContactForm::class)->middleware('throttle:10,1');License
MIT © Arvid de Jong (info@arvid.nl)