darvis/livewire-honeypot
darvis/livewire-honeypot provides lightweight honeypot spam protection for Livewire forms, blocking bots without CAPTCHAs or friction for real users. Simple to install and configure, it integrates cleanly with Laravel and existing Livewire components. No JavaScript required. Drop-in protection.
wire:model paths. This informs component design decisions — particularly whether forms should use the default <x-honeypot /> or bind to nested form properties.ConvertEmptyStringsToNull middleware, and a Livewire security gap where custom-bound honeypots were not actually validated. Product and engineering should prioritize adoption or upgrade review for any Livewire forms using custom wire:model bindings.validateHoneypot(?string $model, ?string $errorKey) arguments and a real-middleware feature test suggests the package is maturing around documented Laravel behavior rather than only happy-path Livewire usage. It is reasonable to keep it in the roadmap for standard form protection, while monitoring for further breaking changes around trait placement.Consider adoption when:
<x-honeypot /> with default attributes, or you are prepared to keep custom wire:model bindings and validateHoneypot(model: ..., errorKey: ...) arguments aligned.null via ConvertEmptyStringsToNull; v1.6.0 fixes this for plain forms.Look elsewhere or add complementary controls when:
HasHoneypot trait on non-component classes and requires action for Livewire forms using custom wire:model bindings.HasHoneypot trait now throws a LogicException there, and the trait must be moved to the component.array_map(fn ($value) => $value ?? '', $request->all()) workaround. It can remain, but the underlying bug is fixed.For executives: The package is a small, Laravel-native honeypot layer for reducing basic form spam without adding CAPTCHA friction. The new v1.6.0 release fixes a real production issue where plain Laravel forms could reject every legitimate submission, and closes a security gap in Livewire forms that bound the honeypot field to a custom property. It also adds test coverage that exercises the real Laravel middleware stack. This is a maintenance and risk-reduction release, not a major feature expansion; it keeps the package viable for low-cost form protection, provided teams review custom Livewire bindings and trait placement.
For engineering: Upgrade is recommended if you use plain forms under default Laravel middleware or Livewire forms with custom <x-honeypot wire:model="..."> bindings. Plain forms now work with validate($request->all()) as documented. Livewire forms with custom bindings must pass the same model path and error key to validateHoneypot(model: ..., errorKey: ...) and ensure the bound property starts as an empty string. Forms using plain <x-honeypot /> need no change. The HasHoneypot trait now throws a LogicException when placed on a Livewire form object or non-component class; move the trait and validation call to the component. The existing array_map(...) workaround is harmless but no longer necessary.
For product: This release reduces the risk of false-positive spam rejections on standard Laravel forms and closes a security gap for Livewire forms using custom honeypot bindings. It supports keeping the package as a low-friction anti-spam layer, but it is not a replacement for broader abuse monitoring. Prioritize a quick upgrade review for any public-facing forms, especially those built with Livewire and custom wire:model attributes.
How can I help you explore Laravel packages today?