update:优化代码
This commit is contained in:
@@ -19,6 +19,10 @@ class SensitiveWord implements ValidateInterface
|
||||
{
|
||||
$trie = app(Trie::class);
|
||||
|
||||
if (!$trie->getTries()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$word = $trie->getSensitiveWords($trie->getTries(), $value, false);
|
||||
|
||||
return !$word;
|
||||
|
Reference in New Issue
Block a user