PHPackages                             larva/laravel-censor - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. larva/laravel-censor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

larva/laravel-censor
====================

This is a censor.

1.4.4(3y ago)51.6kMITPHPPHP ^8.0

Since Feb 19Pushed 3y agoCompare

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

READMEChangelog (10)Dependencies (10)Versions (30)Used By (0)

laravel-censor
==============

[](#laravel-censor)

适用于 Laravel 的内容安全审查扩展。

 [![Stable Version](https://camo.githubusercontent.com/055ffc76d30a4b497de020394b4046d027a6bc64eeeb6c986677e7e95b1cfde3/68747470733a2f2f706f7365722e707567782e6f72672f6c617276612f6c61726176656c2d63656e736f722f762f737461626c65)](https://packagist.org/packages/larva/laravel-censor) [![Total Downloads](https://camo.githubusercontent.com/a96996120dd3e57a93dac1e1984dfa5900da20df80a40c81cb6d0cfa305b3960/68747470733a2f2f706f7365722e707567782e6f72672f6c617276612f6c61726176656c2d63656e736f722f646f776e6c6f616473)](https://packagist.org/packages/larva/laravel-censor) [![License](https://camo.githubusercontent.com/d7cc7310d4a829c4d82793f74245423c2586e01fe931f7610ac717b8ab71766e/68747470733a2f2f706f7365722e707567782e6f72672f6c617276612f6c61726176656c2d63656e736f722f6c6963656e7365)](https://packagist.org/packages/larva/laravel-censor)

环境需求
----

[](#环境需求)

- PHP &gt;= 7.4

安装
--

[](#安装)

```
composer require larva/laravel-censor -vv
```

使用
--

[](#使用)

### 自动审核

[](#自动审核)

```
use Larva\Censor\Censor;
$censor = Censor::make();
$content= '赚钱啦';
try {
  $content = $censor->textCensor($content);
  if($censor->isMod){
    //需要审核
  }
} catch (CensorNotPassedException $e) {
    //有违禁词
}
```

### 表单验证

[](#表单验证)

表单验证只检查是否有违禁词，需要审核的直接是放行的，使用本扩展，再用户发布内容后，建议使用队列异步审核一遍。

```
$request->validate([
    'name' => ['required', 'string', new TextCensorRule],
]);

$request->validate([
    'name' => ['required', 'string', 'text_censor'],
]);
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 67.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Recently: every ~28 days

Total

29

Last Release

1438d ago

PHP version history (2 changes)1.0.5PHP ^7.3|^8.0

1.3.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/534cdb651e8c806590fa945c6b5a18f361613848e890db1349f4a9fbcae1a650?d=identicon)[xutongle](/maintainers/xutongle)

---

Top Contributors

[![xutl](https://avatars.githubusercontent.com/u/20939388?v=4)](https://github.com/xutl "xutl (29 commits)")[![xutongle](https://avatars.githubusercontent.com/u/46956076?v=4)](https://github.com/xutongle "xutongle (14 commits)")

---

Tags

laravelphplaravelcensorLarva

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/larva-laravel-censor/health.svg)

```
[![Health](https://phpackages.com/badges/larva-laravel-censor/health.svg)](https://phpackages.com/packages/larva-laravel-censor)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M618](/packages/laravel-scout)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M209](/packages/illuminate-broadcasting)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
