Weave 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

Banhammer Laravel Package

mchev/banhammer

Laravel package for banning users, IP addresses, and other entities with a polymorphic ban model, middleware, events, and helper methods. Supports temporary or permanent bans, reasons, and easy integration into existing applications.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Abuse & trust-and-safety baseline: Enables banning by user, IP, email, or country with a model trait, middleware, and cache-backed lookups — a low-effort foundation for moderating abusive behavior in community, marketplace, and multi-tenant SaaS products.
  • Build vs. buy: Replaces bespoke "block the bad actor" logic (ban tables, middleware, expiry, auto-ban-on-failed-login) with a maintained package. Choose it over building to save engineering time and avoid reimplementing edge cases like TTL expiry and IP normalization.
  • Automated abuse mitigation: Auto-ban on repeated failed logins is a ready-made control for credential-stuffing and brute-force defenses, useful when scoping security roadmap items.
  • Feature enablement: Supports roadmap items like "moderation tools," "spam/abuse controls," and "account bans" without new backend surface area.
  • Use cases: Community platforms (spam, harassment), SaaS (trial abuse, repeated signups), auth flows (login throttling), and any product needing coarse-grained access revocation with minimal infra.

When to Consider This Package

Adopt when:

  • You need IP/user/email/country bans enforced via Laravel middleware and cache-backed checks.
  • You want automatic bans triggered by failed login attempts with configurable thresholds and expiry.
  • Your model layer can adopt a simple Bannable trait and you're comfortable with the package's config-driven approach.
  • You value a lightweight dependency that tracks current Laravel/PHP versions (v2.5.0 adds Laravel 13.x and PHP 8.5 test coverage, signaling ongoing maintenance).

Look elsewhere when:

  • You need rich moderation workflows (appeals, review queues, multi-level sanctions, audit trails) — this is a coarse ban primitive, not a moderation platform.
  • You require fine-grained RBAC/permission changes rather than outright bans.
  • Geo-based blocking needs production-grade GeoIP data provided out of the box (country support depends on external IP/geo data).
  • You need vendor-supported SLAs or enterprise support contracts.

How to Pitch It (Stakeholders)

For executives: Banhammer gives us a proven, low-cost trust-and-safety primitive — blocking abusive users, IPs, emails, and countries with automated bans on repeated failed logins. Adopting it avoids building and maintaining this logic ourselves, and its active release cadence (now supporting Laravel 13.x and PHP 8.5) reduces upgrade risk. Net: faster delivery of abuse controls at minimal ongoing cost.

For engineering: Drop-in Laravel integration via a Bannable model trait plus middleware; cache-backed lookups keep request overhead low, and auto-ban-on-failed-login is configurable. The v2.5.0 release is a pure compatibility/maintenance update (Laravel 13.x support, PHP 8.5 tests) with no breaking changes — safe to adopt and a good sign the package is actively maintained.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin