PHP code example of patoui / laravel-bad-word

1. Go to this page and download the library: Download patoui/laravel-bad-word 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/ */

    

patoui / laravel-bad-word example snippets


'field_name' => 'bad_word'

'field_name' => 'bad_word:en,fr' // english and french only

'bad_word' => 'The :attribute cannot contain bad words.',

'providers' => [
    // ...
    Patoui\LaravelBadWord\BadWordServiceProvider::class,
];

php artisan vendor:publish --provider="Patoui\LaravelBadWord\BadWordServiceProvider"