PHPackages                             jundayw/laravel-interceptor - 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-interceptor

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

jundayw/laravel-interceptor
===========================

Sensitive Word Filter.

v1.1.0(1y ago)110MITPHPPHP &gt;=8.0

Since Aug 31Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

laravel-interceptor
===================

[](#laravel-interceptor)

[![GitHub Tag](https://camo.githubusercontent.com/e1d9de5f39a2f10e5a7d1d799d1799f6b48698a38c15ec73ef283658e0e166f0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6a756e646179772f6c61726176656c2d696e746572636570746f72)](https://github.com/jundayw/laravel-interceptor/tags)[![Total Downloads](https://camo.githubusercontent.com/470dac19156af101a3c052ebccf1ec7b4c794c229322d45f5420882ffca6aa41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a756e646179772f6c61726176656c2d696e746572636570746f723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jundayw/laravel-interceptor)[![Packagist Version](https://camo.githubusercontent.com/b6452e627f200969df9ab39cd6f6dcf9e5c8068d6708584ec71e6b0eb4963094/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a756e646179772f6c61726176656c2d696e746572636570746f72)](https://packagist.org/packages/jundayw/laravel-interceptor)[![Packagist PHP Version Support](https://camo.githubusercontent.com/f7cf46071fb451270d6be4785456337e05bc53af103016be58ce2521786d887d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a756e646179772f6c61726176656c2d696e746572636570746f72)](https://github.com/jundayw/laravel-interceptor)[![Packagist License](https://camo.githubusercontent.com/8288154920cf32481e0e26203d5608592694640a4c3e1c391696810e448e2d10/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a756e646179772f6c61726176656c2d696e746572636570746f72)](https://github.com/jundayw/laravel-interceptor)

安装
--

[](#安装)

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

```
composer require jundayw/laravel-interceptor
```

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

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

```
php artisan vendor:publish --provider="Jundayw\LaravelInterceptor\InterceptorServiceProvider"
```

或单独发布配置文件

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

或单独发布迁移文件

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

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

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

数据填充：

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

### 自定义迁移

[](#自定义迁移)

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

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

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

### 扩展云端过滤器

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

本扩展包默认支持 `Eloquent` 驱动的 `\Jundayw\LaravelInterceptor\Support\LocalFilter::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)的文本审核功能。

```
