Download the PHP package blaspsoft/blasp without Composer

On this page you can find all versions of the php package blaspsoft/blasp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package blasp

GitHub Workflow Status (main) Total Downloads Latest Version License

Blasp - Advanced Profanity Filter for Laravel

Blasp is a powerful, extensible profanity filter package for Laravel that helps detect and mask profane words in text. Version 3.0 introduces a simplified API with method chaining, comprehensive multi-language support (English, Spanish, German, French), all-languages detection mode, and advanced caching for enterprise-grade performance.

✨ Key Features

Installation

You can install the package via Composer:

Quick Start

Basic Usage

Simplified API with Method Chaining

Working with Results

Profanity Detection Types

Blasp can detect different types of profanities based on variations such as:

  1. Straight match: Direct matches of profane words.
  2. Substitution: Substituted characters (e.g., pro0fΓ‘n1ty).
  3. Obscured: Profanities with separators (e.g., p-r-o-f-a-n-i-t-y).
  4. Doubled: Repeated letters (e.g., pprrooffaanniittyy).
  5. Combination: Combinations of the above (e.g., pp-rof@n|tty).

Laravel Validation Rule

Blasp also provides a custom Laravel validation rule called blasp_check, which you can use to validate form input for profanity.

Example

Configuration

Blasp uses configuration files to manage profanities, separators, and substitutions. The main configuration includes:

You can publish the configuration files:

This will publish:

Custom Configuration

You can specify custom profanity and false positive lists using the configure() method:

This is particularly useful when you need different profanity rules for specific contexts, such as username validation.

πŸš€ Advanced Features (v3.0+)

All Languages Detection

Perfect for international platforms, forums, or any application with multilingual content:

Multi-Language Support

Blasp includes comprehensive support for multiple languages with automatic character normalization:

Complete Chainable Methods Reference

Advanced Method Chaining Examples

Laravel Integration

Cache Management

Blasp uses Laravel's cache system to improve performance. The package automatically caches profanity expressions and their variations. To clear the cache, you can use the provided Artisan command:

This command will clear all cached Blasp expressions and configurations.

⚑ Performance

Blasp v3.0 includes significant performance optimizations:

Benchmarks

Version 3.0 shows substantial performance improvements over v2:

πŸ”„ Migration from v2.x to v3.0

100% Backward Compatible

All existing v2.x code continues to work without any changes:

New Features in v3.0

Take advantage of the simplified API:

🎨 Custom Masking

Using Custom Mask Characters

You can customize how profanities are masked using the maskWith() method:

Setting Default Mask Character

You can set a default mask character in the configuration:

Combining with Other Methods

The maskWith() method can be chained with other methods:

πŸ—οΈ Architecture

Blasp v3.0 follows SOLID principles and modern PHP practices:

πŸ“‹ Requirements

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

πŸ“„ Changelog

See CHANGELOG.md for detailed version history.

License

Blasp is open-sourced software licensed under the MIT license.


All versions of blasp with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package blaspsoft/blasp contains the following files

Loading the files please wait ....