Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Spam Bundle

Spam Bundle Laravel Package

isometriks/spam-bundle

Symfony bundle to reduce spam on forms with simple protections like timed submission (min/max seconds between render and submit) and honeypot fields. Easy Composer install, configurable defaults, and per-form options to enable or override settings.

View on GitHub
Deep Wiki
Context7

Symfony Form Spam Protection

Frequently asked questions about Spam Bundle
Can I use this Symfony spam bundle directly in Laravel without issues?
No, this package is designed for Symfony and relies on its Form component, EventDispatcher, and translation system. Laravel lacks direct equivalents, so you’d need a custom wrapper or alternative package like `spatie/laravel-honeypot`.
What’s the best Laravel alternative for timed form submission delays?
Laravel doesn’t natively support timed form validation like Symfony. You’d need middleware (e.g., `throttle` or custom logic) to track submission timestamps via sessions or cookies, but this requires manual implementation.
How do I configure honeypot fields in Laravel if this bundle isn’t compatible?
Use `spatie/laravel-honeypot` for Laravel. It provides Blade directives and validation rules to hide fields from bots. Example: `@honeypot` in Blade templates and `'honeypot' => 'required'` in validation rules.
Will timed spam prevention break AJAX form submissions in Laravel?
Yes, timed checks rely on server-side timestamps tied to form rendering. In Laravel, AJAX submissions would need client-side tracking (e.g., JavaScript timestamps) or server-side session storage, which complicates implementation.
Does this bundle support multi-language error messages for honeypots/timed checks?
Yes, the Symfony bundle uses Symfony’s `TranslatorInterface` for customizable messages. In Laravel, you’d need to manually integrate the `lang` file system or use `spatie/laravel-translation-loader` for similar functionality.
How do I test timed spam prevention in Laravel if I port this logic?
Mock Laravel’s request lifecycle to simulate form submission delays. Use `Carbon` for timestamp comparisons and test with `HttpTests` or `Pest` to verify validation errors for premature submissions.
Can I disable timed checks globally but enable them per-form in Laravel?
Not natively with this bundle. In Laravel, you’d need to implement a middleware or validation rule (e.g., `TimedFormValidator`) that checks timestamps per route or form type.
What’s the performance impact of honeypot fields in production?
Minimal. Honeypots add a hidden field and validation check, but no database writes. The overhead is negligible unless you’re processing thousands of submissions per second.
Are there false positives with timed spam prevention (e.g., legitimate users)?
Yes, aggressive `min` values (e.g., 30+ seconds) may frustrate users refreshing forms. Test with real users and adjust thresholds—start with 5–10 seconds for most forms.
How do I monitor false positives or bot detection rates in Laravel?
Log validation failures (e.g., honeypot triggers) to a table or use Laravel’s `failed` events. Analyze patterns with tools like `laravel-debugbar` or custom queries to refine spam rules.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver