Laravel Blacklist

README.md

Laravel Blacklist

Laravel Blacklist: A robust content filtering solution for Laravel applications that provides comprehensive validation against unwanted user input. This package offers dual-layer protection with both system blacklist words (preventing username squatting and system impersonation) and profanity/offensive terms filtering.

Key features:

  • Intelligent Word Boundary Matching: Prevents false positives while catching problematic content.
  • Flexible Filtering Modes: Use system blacklist only, profanity filtering only, or both simultaneously.
  • Advanced Matching Strategies:
    • Exact: Whole word matching (default).
    • Fuzzy: Catch typos using Levenshtein distance (e.g., "admin" matches "adm1n").
    • Substitution: Catch "leet speak" substitutions (e.g., "h3ll0").
  • Context-Aware Validation: Define different validation rules for different fields (e.g., stricter rules for usernames vs comments).
  • Whitelist & Ignore Patterns: Globally whitelist terms or use regex to ignore specific patterns.
  • Customizable Word Lists: Easily extend or modify lists via configuration.
  • Detailed Error Messages: Users receive context-aware validation feedback.
  • Built-in Security Logging: Support for custom log channels.
  • Simple Integration: Works with Laravel controllers, Livewire components, and forms.
  • Zero Dependencies: Lightweight and efficient.
  • Optional Logging Support: Pass a custom log channel to capture violations or auditing.

Perfect for applications requiring content moderation, user registration systems, comment sections, or any user-generated content that needs protection against inappropriate language or system term abuse.

Related Packages

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-rate-limiting.php

Laravel Rate Limiting

Comprehensive Laravel rate limiting solution featuring intelligent DDoS protection, exponential backoff algorithms, custom throttling rules, and real-time monitoring. Includes Blade components, API protection, brute force prevention, and performance optimization. Essential for high-traffic applications requiring robust security and stability.

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.