PHPackages                             qvbilam/audit - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. qvbilam/audit

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

qvbilam/audit
=============

1.1.0(3y ago)091[1 PRs](https://github.com/qvbilam/audit/pulls)PHP

Since Mar 13Pushed 3y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (8)Used By (0)

[![Packagist Version (custom server)](https://camo.githubusercontent.com/54bb64543d50ffc227a7e7745ead4c3d1610e055c235cf1a1c0f4413c0b88eba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f717662696c616d2f6175646974)](https://camo.githubusercontent.com/54bb64543d50ffc227a7e7745ead4c3d1610e055c235cf1a1c0f4413c0b88eba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f717662696c616d2f6175646974)[![Tests](https://github.com/qvbilam/audit/actions/workflows/main.yaml/badge.svg)](https://github.com/qvbilam/audit/actions/workflows/main.yaml)[![StyleCI](https://camo.githubusercontent.com/87bc162859358cef888586f7cf47fc012e9eac966731846c7a5136bc94be2f9f/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3631333234363433312f736869656c64)](https://packagist.org/packages/qvbilam/audit)[![PHP VERSION](https://camo.githubusercontent.com/d1e503aa0d4df7ff6c76928837891a863b8f22da6fbac5ddb38609a7df7e8c6b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e332d626c7565)](https://camo.githubusercontent.com/d1e503aa0d4df7ff6c76928837891a863b8f22da6fbac5ddb38609a7df7e8c6b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e332d626c7565)[![GitHub repo size](https://camo.githubusercontent.com/054ab7867e0b744ae84de723122ce0e670cfe97095fb3fe89445224e921a832e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f717662696c616d2f6175646974)](https://camo.githubusercontent.com/054ab7867e0b744ae84de723122ce0e670cfe97095fb3fe89445224e921a832e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f717662696c616d2f6175646974)

### 说明

[](#说明)

使用 [数美天净](https://help.ishumei.com/) 智能审核

### 安装

[](#安装)

通过 composer 拉取包

```
{
    "require": {
        "qvbilam/audit": "1.*"
    }
}
```

或者通过命令: `composer require qvbilam/audit`

### 使用

[](#使用)

#### 验证文本

[](#验证文本)

```
use Qvbilam\Audit\Audit;
$audit = new Audit("key", "appId");
$response = $audit->text("文本内容");

return $response->toJson();
```

#### 验证图片

[](#验证图片)

```
use Qvbilam\Audit\Audit;
$audit = new Audit("key", "appId");
$response = $audit->image("图片地址");

return $response->toJson();
```

返回结果示例

```
{
  "requestId":"43d9b42af973166ee6127b38aaa8ed88",
  "status":"-1",
  "description":"辱骂：不文明用语：轻度不文明用语",
  "text":"草泥马",
  "riskType":"abuse",
  "score":71
}
```

#### Laravel 中使用

[](#laravel-中使用)

`.env` 文件添加配置:

```
# 应用key
AUDIT_KEY=xxxx
# 应用appId
AUDIT_APP_ID=xxxx
```

配置 config/services.php :

```
'audit' => [
    "key" => env("AUDIT_KEY"),
    "app_id" => env("AUDIT_APP_ID"),
],
```

通过自动注入方式使用:

```
use Qvbilam\Audit\Audit;

public function auditText(Request $request, Audit $audit)
{
    $text = $request->query("txt");
    $audit = $audit->text($text);
    return $audit->toJson();
}
```

或者使用服务名称方式使用:

```
use Qvbilam\Audit\Audit;

public function auditTextInjection(Request $request)
{
    $text = $request->query("txt");
    return app("audit")->text($text)->toJson();
}
```

### 结果

[](#结果)

方法类型描述toJson()string返回json结果集toArray()array返回array结果集isPass()bool是否通过审核isReview()bool是否需要人工审核isReject()bool是否拒绝getRequestId()string获取请求idgetStatus()int获取审核状态getDescription()string获取描述说明getRiskType()string获取风险类型getScore()int获取危险分数\[0, 1000\]

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~0 days

Total

2

Last Release

1208d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/110ab16dfb26337af3176b5ea0d0a42b78c6ec22f6aba5adcaaca1574d4253b1?d=identicon)[qvbilam](/maintainers/qvbilam)

---

Top Contributors

[![qvbilam](https://avatars.githubusercontent.com/u/35822346?v=4)](https://github.com/qvbilam "qvbilam (3 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/qvbilam-audit/health.svg)

```
[![Health](https://phpackages.com/badges/qvbilam-audit/health.svg)](https://phpackages.com/packages/qvbilam-audit)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[spatie/flare-client-php

Send PHP errors to Flare

177161.5M23](/packages/spatie-flare-client-php)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)

PHPackages © 2026

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