敏感词验证服务
composer require mycontroller/laravel-sensitive-word
在 /config/app.php
文件中找到 providers
键,
'providers' => [
...
MyController\SensitiveWord\Providers\SensitiveWordServiceProvider::class,
...
];
在 /config/app.php
文件中找到 aliases
键,
'aliases' => [
...
'SensitiveWord' => MyController\SensitiveWord\Facades\SensitiveWordFacade::class,
...
];
$result = SensitiveWord::getFirstSensitiveWordInContent('待验证的含有敏感词的字符串');
dd($result);
提供了表单验证规则 has_sensitive_word
这部分还没有做
MIT