PHPackages                             dcat-x/operation-log - 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. dcat-x/operation-log

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

dcat-x/operation-log
====================

Operation log extension for Dcat Admin

v1.0.0(5mo ago)02MITPHPPHP ^8.2CI passing

Since Jan 16Pushed 5mo agoCompare

[ Source](https://github.com/dcat-x/operation-log)[ Packagist](https://packagist.org/packages/dcat-x/operation-log)[ Docs](https://github.com/dcat-x/operation-log)[ RSS](/packages/dcat-x-operation-log/feed)WikiDiscussions main Synced today

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

Operation Log
=============

[](#operation-log)

 [![Tests](https://github.com/dcat-x/operation-log/actions/workflows/tests.yml/badge.svg)](https://github.com/dcat-x/operation-log/actions) [![Latest Stable Version](https://camo.githubusercontent.com/9806e850f6ea5c81e6f318a40a0b017fed72548ac21b87e3ae56d9809363a6bc/68747470733a2f2f706f7365722e707567782e6f72672f646361742d782f6f7065726174696f6e2d6c6f672f762f737461626c65)](https://packagist.org/packages/dcat-x/operation-log) [![Total Downloads](https://camo.githubusercontent.com/76aae035fa517c8a6cddb2064c82f27cbf9c27cc59aba8fd5cfd0798836ce468/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646361742d782f6f7065726174696f6e2d6c6f672e737667)](https://packagist.org/packages/dcat-x/operation-log) [![PHP Version](https://camo.githubusercontent.com/a6cbb407d7c9516800449295b3078b103b2e1c766bafda03f7ceba178aee51b9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322b2d3539613966382e737667)](https://www.php.net/) [![Laravel Version](https://camo.githubusercontent.com/9429da85454daee5672bc536c99fa284dd523403bab5556f5710ff8281468f54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31322b2d3539613966382e737667)](https://laravel.com/) [![Dcat Admin Version](https://camo.githubusercontent.com/9e29e5f17da06aaadd5a2d6578952e8d3ad4817fb71ba2b05ce40aa874ce3562/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646361742d2d61646d696e2d312e302b2d3539613966382e737667)](https://github.com/dcat-x/dcat-admin) [![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

**Dcat Admin 操作日志扩展，自动记录管理后台的所有操作**

功能特性
----

[](#功能特性)

- 自动记录所有后台操作请求
- 支持多种 HTTP 方法过滤
- 敏感字段自动脱敏处理
- 灵活的路由排除规则
- 多语言支持（中文/英文/繁体中文）
- 可视化日志管理界面

安装
--

[](#安装)

```
composer require dcat-x/operation-log
```

配置
--

[](#配置)

### 扩展设置

[](#扩展设置)

在 Dcat Admin 扩展管理页面启用后，可通过设置页面配置：

配置项说明`except`排除的路由，不记录这些路径的操作`allowed_methods`允许记录的 HTTP 方法`secret_fields`敏感字段，这些字段的值会被脱敏处理### 默认配置

[](#默认配置)

- **敏感字段**: `password`, `password_confirmation`
- **排除路由**: `dcat-admin.operation-log.*`
- **允许方法**: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`

使用
--

[](#使用)

安装并启用扩展后，系统会自动记录所有管理后台操作。

### 访问日志

[](#访问日志)

通过菜单或直接访问：

```
/admin/auth/operation-logs

```

### 日志内容

[](#日志内容)

每条操作日志包含：

- 操作用户
- 请求方法 (GET/POST/PUT/DELETE 等)
- 请求路径
- 客户端 IP
- 请求参数 (敏感字段已脱敏)
- 操作时间

### 日志管理

[](#日志管理)

- 支持按用户、方法、路径、IP、时间范围过滤
- 支持删除单条或批量删除日志

数据库
---

[](#数据库)

扩展会创建 `admin_operation_log` 表：

字段类型说明idbigint主键user\_idbigint用户 IDpathstring请求路径methodstring(10)HTTP 方法ipstring(45)客户端 IPinputtext请求参数 (JSON)created\_attimestamp创建时间updated\_attimestamp更新时间开发
--

[](#开发)

```
# 安装依赖
composer install

# 代码格式化
composer lint

# 运行测试
composer test
```

更新日志
----

[](#更新日志)

详见 [CHANGELOG](CHANGELOG.md)

许可证
---

[](#许可证)

[MIT](LICENSE)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance70

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

168d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1a5cf1d598b649d03d3514155a1da4ff4c105c3173945e80298a07ccc077c5c?d=identicon)[huanghua581](/maintainers/huanghua581)

---

Top Contributors

[![myxiaoao](https://avatars.githubusercontent.com/u/1223134?v=4)](https://github.com/myxiaoao "myxiaoao (2 commits)")

---

Tags

laravelextensionaudit-logdcat adminoperation-log

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/dcat-x-operation-log/health.svg)

```
[![Health](https://phpackages.com/badges/dcat-x-operation-log/health.svg)](https://phpackages.com/packages/dcat-x-operation-log)
```

###  Alternatives

[muhammadsadeeq/laravel-activitylog-ui

A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.

17717.0k](/packages/muhammadsadeeq-laravel-activitylog-ui)[alizharb/filament-activity-log

A powerful, feature-rich activity logging solution for FilamentPHP v4 &amp; v5 with timeline views, dashboard widgets, and revert actions.

2871.8k3](/packages/alizharb-filament-activity-log)[super-eggs/dcat-log-viewer

方便在管理后台查看日志

154.6k](/packages/super-eggs-dcat-log-viewer)

PHPackages © 2026

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