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-simple-datatables-and-forms.php

Laravel Simple Data Tables And Forms

Streamlined Laravel Livewire package for building dynamic, searchable data tables and feature-rich forms. Offers advanced filtering, sorting, pagination, bulk actions, and real-time validation without page refreshes. Ideal for admin panels, dashboards, CRUD interfaces, and data management applications requiring responsive user interactions.

laravel-locations.php

Laravel Locations

Professional Laravel package providing comprehensive location management with 250+ countries, 5,000+ states/regions, and 149,000+ cities. Features multi-language translations, currency data, address validation, and seamless Eloquent relationships. Perfect for e-commerce, shipping, user registration, and international applications requiring robust geographical data management.

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.

laravel-route-label.php

Laravel Route Label

Route Label adds a simple way to assign labels to your named Laravel routes and retrieve them anywhere in your application. With the routeLabel() helper and the @routeLink Blade directive, you can easily generate navigation links, breadcrumbs, or menus without repeating strings or relying solely on translations. Labels fall back to the route name if none is defined, keeping your code clean and consistent.