almazary / laravel-word-censor

Replace certain words with a *** sign

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Word Censor

Latest Version on Packagist Total Downloads

This package will make it easier when you want to replace certain words with a *** sign

Installation

You can install the package via composer:

composer require almazary/laravel-word-censor

publish the config file with:

php artisan vendor:publish --tag="laravel-word-censor-config"

Usage

Via facade:

use Almazary\LaravelWordCensor\LaravelWordCensorFacade;

$a = LaravelWordCensorFacade::replace('bigger boob');
// result: bigger ***

Via middleware:

protected $middleware = [
    ...,
    ...,
    \Almazary\LaravelWordCensor\Middleware\Replace::class,
];

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email almazary@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

About

Replace certain words with a *** sign

License:MIT License


Languages

Language:PHP 100.0%