PHPackages                             jundayw/laravel-sensitive - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. jundayw/laravel-sensitive

ActiveLibrary[Search &amp; Filtering](/categories/search)

jundayw/laravel-sensitive
=========================

Laravel Sensitive Words Filter Package.

v2.1.0(1y ago)12.1k1MITPHPPHP &gt;=8.0

Since Sep 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jundayw/laravel-sensitive)[ Packagist](https://packagist.org/packages/jundayw/laravel-sensitive)[ RSS](/packages/jundayw-laravel-sensitive/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (4)Used By (0)

Laravel Sensitive Words Filter Package
======================================

[](#laravel-sensitive-words-filter-package)

[![Latest Stable Version](https://camo.githubusercontent.com/6d5d61090e26ebcb6b77d6b5c9742204f68149027cd2b106ab767d05e479b3f8/68747470733a2f2f706f7365722e707567782e6f72672f6a756e646179772f6c61726176656c2d73656e7369746976652f76)](https://packagist.org/packages/jundayw/laravel-sensitive)[![Total Downloads](https://camo.githubusercontent.com/d0b1f8cd2a8c7081419a7ea6cf8ce7bc51797417170397a4bd4c0bc895f34f93/68747470733a2f2f706f7365722e707567782e6f72672f6a756e646179772f6c61726176656c2d73656e7369746976652f646f776e6c6f616473)](https://packagist.org/packages/jundayw/laravel-sensitive)[![Latest Unstable Version](https://camo.githubusercontent.com/a93fb3e69a5d63f19b5b807848d21d73317f4e28838cfde129ffee2163d6e89b/68747470733a2f2f706f7365722e707567782e6f72672f6a756e646179772f6c61726176656c2d73656e7369746976652f762f756e737461626c65)](https://packagist.org/packages/jundayw/laravel-sensitive)[![License](https://camo.githubusercontent.com/408b3f68345b83d5ee33db55afc05325bebd9d90eaa74c31f67c2853cfcae16d/68747470733a2f2f706f7365722e707567782e6f72672f6a756e646179772f6c61726176656c2d73656e7369746976652f6c6963656e7365)](https://packagist.org/packages/jundayw/laravel-sensitive)[![PHP Version Require](https://camo.githubusercontent.com/fc0c999afda8c11ebee9f80d6258969f8085e5971209edfa5810344c715dfa55/68747470733a2f2f706f7365722e707567782e6f72672f6a756e646179772f6c61726176656c2d73656e7369746976652f726571756972652f706870)](https://packagist.org/packages/jundayw/laravel-sensitive)

安装
--

[](#安装)

推荐使用 PHP 包管理工具 [Composer](https://getcomposer.org/) 软件包管理器安装：

```
composer require jundayw/laravel-sensitive
```

接下来，你需要使用 `vendor:publish` Artisan 命令发布的配置和迁移文件。

配置文件将会保存在 config 文件夹中：

```
php artisan vendor:publish --provider="Jundayw\LaravelSensitive\SensitiveServiceProvider"
```

或单独发布配置文件

```
php artisan vendor:publish --tag=sensitive-config
```

或单独发布迁移文件

```
php artisan vendor:publish --tag=sensitive-migrations
```

最后，您应该运行数据库迁移。

```
php artisan migrate --path=database/migrations/2022_08_31_182223_create_sensitive_table.php
```

数据填充：

```
php artisan db:seed --class=SensitiveSeeder
```

### 自定义迁移

[](#自定义迁移)

如果你不想使用默认迁移，你应该在 `sensitive.php` 配置文件中将 `migration` 设置为 `false`。

您可以通过执行以下命令导出默认迁移：

```
php artisan vendor:publish --tag=sensitive-migrations
```

### 扩展云端过滤器

[](#扩展云端过滤器)

本扩展包默认支持 `Eloquent` 驱动的 `\Jundayw\LaravelSensitive\LocalInterceptor::class` 本地过滤器，

可自定义扩展 [百度云](https://ai.baidu.com/ai-doc/ANTIPORN/Vk3h6xaga)、[腾讯云](https://cloud.tencent.com/document/product/1124/51860)、[阿里云](https://help.aliyun.com/document_detail/70439.html)的文本审核功能。

```
