MyController / laravel-sensitive-word by MyController

Sensitive Word Service For Laravel5 and Lumen5
593
2
2
Package Data
Maintainer Username: MyController
Maintainer Contact: mycontroller@163.com (MyController)
Package Create Date: 2016-09-20
Package Last Update: 2023-08-29
Language: PHP
License: MIT
Last Refreshed: 2024-12-24 15:00:52
Package Statistics
Total Downloads: 593
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 2
Total Forks: 3
Total Open Issues: 0

Sensitive Word Service For Laravel5 and Lumen5

敏感词验证服务

安装

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