rappasoft/lockout
Laravel Lockout is a simple package that locks user accounts after a configurable number of failed login attempts, helping protect applications from brute-force attacks. It includes middleware, events, and customizable lockout behavior for Laravel authentication.
artisan down. Native maintenance mode is all-or-nothing; this package adds route-pattern targeting, IP/CIDR allowlists, and named/API route detection — which is precisely the layer teams end up writing themselves during their first incident.Adopt when:
Look elsewhere when:
APP_READ_ONLY comes from external environment variables, the toggle must be changed through your deployment system — the package cannot persist it. In that architecture, use a database- or service-backed flag instead.To executives: A low-cost operational safety net that lets us disable a broken part of the product in seconds without shipping code — cutting time-to-recovery during incidents. It's actively maintained, tested across 11 PHP/Laravel combinations (86 tests, 184 assertions), and is ready for Laravel 13, so it supports rather than blocks our framework upgrade commitment. Adopting it is a small dependency bet against a recurring class of outage.
To engineering: Drop-in from v6.0.0 — additive compatibility plus bug fixes, no breaking changes. v6.1.0 hardens the parts you'd otherwise get wrong: atomic env writes that preserve existing file permissions, clearing of stale config/status caches, malformed CIDR rejection, literal route-pattern matching, and named/API route detection happening before global middleware dispatch. The failure semantics are honest — no success event if persistence fails. The trade-off is an explicit operational contract: rebuild config caches and restart workers/Octane after a toggle; --clear-cache remains accepted so existing scripts don't break.
To security/compliance: Requires PHP 8.2+ (8.3+ on Laravel 13), tested through PHP 8.5. Current Laravel 12/13 dependency audits are clean. The Laravel 11 CI advisory exceptions are enumerated upstream framework advisories and do not represent a change to application security policy — production should be on patched Laravel 12 or 13.
How can I help you explore Laravel packages today?