mycontroller / laravel-sensitive-word
Sensitive Word Service For Laravel5 and Lumen5
5.5.0
2023-08-24 09:07 UTC
Requires
- php: >=5.5.9
- illuminate/http: 5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*
- illuminate/routing: 5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*
- illuminate/session: 5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*
- illuminate/support: 5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*
README
敏感词验证服务
安装
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
关于自定义敏感词库
这部分还没有做
License
MIT