Laravel Rate Limiting

README.md

Laravel Advanced Rate Limiting Package

Screenshot Screenshot

An advanced rate limiting package for Laravel with exponential backoff, custom messages, and built-in Blade components. This package provides comprehensive protection against DDoS attacks, brute force attempts, and other malicious activities while maintaining a positive user experience for legitimate users.

Features

  • Multi-layered protection with configurable limits for different authentication endpoints
  • Intelligent backoff strategies (linear, Fibonacci, and exponential)
  • Granular limit types (global, per-email, per-IP, per-session, per-username+IP)
  • Progressive user feedback with proactive warnings before lockouts
  • Context-aware messaging with intelligent suggestions based on the situation
  • Built-in Blade components for error and warning messages
  • Comprehensive logging and monitoring capabilities
  • Flexible configuration with easy enable/disable controls

Essentially, this package takes Laravel's basic rate limiting capabilities and extends them with sophisticated features specifically tailored for authentication security, making it much easier to implement robust protection against brute force attacks without having to build all these features yourself.

Architecture

The system is built around a dedicated service provider that implements a configuration-driven approach:

  • Separation of concerns: Rate limiting logic is isolated from application logic
  • Configuration-driven design: All limiters are defined in a single, maintainable configuration array
  • Extensible architecture: New limiters and limit types can be added with minimal code changes
  • Performance optimized: Uses Laravel's cache system with efficient key generation

Requirements

  • PHP 8.2 or higher
  • Laravel 10.x ~13.x

Related Packages

laravel-blacklist.php

Laravel Blacklist

Advanced Laravel validation package providing intelligent content filtering with customizable blacklists, profanity detection, and whole-word matching algorithms. Prevents spam, inappropriate content, and system abuse while avoiding false positives. Essential for user-generated content, comments, forums, and social platforms.

laravel-gdpr-exporter.php

Laravel GDPR Exporter

Professional Laravel package ensuring GDPR compliance through automated user data exports in JSON, CSV, XML, and HTML formats. Features Livewire components, progress tracking, email notifications, and data anonymization options. Simplifies privacy regulation compliance for European market applications and user data management.

laravel-skeleton.php

Laravel skeleton template

Production-ready Laravel application starter featuring modern architecture, authentication, Tailwind CSS, Livewire, testing, code quality tooling, and scalable development conventions.

laravel-email-change-confirmation.php

Laravel Email Change Confirmation

Enterprise-grade Laravel package implementing secure email change workflows with dual confirmation system. Features fraud prevention, rate limiting, email verification, rollback capabilities, and audit trails. Protects user accounts from unauthorized access while maintaining seamless user experience in authentication systems.