PHP code example of joshuabedford / laravel-word-filter

1. Go to this page and download the library: Download joshuabedford/laravel-word-filter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

joshuabedford / laravel-word-filter example snippets


$string = app('wordFilter')->filter('something with a bad word');

$string = app('wordFilter')->replaceWith('#')->replaceFullWords(false)->filter('something with a bad word'));

$request->validate([
    'username' => '

    [
      "orig" => "",
      "clean" => "",
      "hasMatch" => boolean,
      "matched" => []
    ]
    

php artisan vendor:publish

php artisan migrate

php artisan db:seed --class=JoshuaBedford\\LaravelWordFilter\\Database\\Seeds\\DatabaseSeeder