📜  laravel 脏话检查 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:22.928000             🧑  作者: Mango

代码示例2
use Askedio\Laravel5ProfanityFilter\ProfanityFilter;

$config = []; // Data from `resources/config/profanity.php`
$badWordsArray = []; // Data from `resources/lang/[lang]/profanity.php`

$profanityFilter =  new ProfanityFilter($config, $badWordsArray);
$string = $profanityFilter->filter('something with a bad word');