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

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

tangjun/operation-log
=====================

A laravel package of sys audit log

1.0.2(6y ago)128[1 issues](https://github.com/phptj/operation-log/issues)MITPHPPHP &gt;=5.4.0

Since Jul 5Pushed 6y agoCompare

[ Source](https://github.com/phptj/operation-log)[ Packagist](https://packagist.org/packages/tangjun/operation-log)[ RSS](/packages/tangjun-operation-log/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

operation-log
=============

[](#operation-log)

Laravel 5 操作日志自动记录

安装
--

[](#安装)

可以通过 [Composer](http://getcomposer.org) 安装 `tangjun/operation-log`， 在`composer.json`require部分引入，然后执行 `composer install`或`composer update`（注意 ：composer update会更新你其他没有固定本部的组件）.

```
{
    "require": {

        "tangjun/operation-log": "~1.0"

    }

}
```

或者

项目根目录执行:

```
composer require tangjun/operation-log

```

使用
--

[](#使用)

要使用sys-audit-log服务提供程序，在引导Laravel应用程序时必须注册该提供程序。有 基本上有两种方法。

Find the `providers` key in `config/app.php` and register the ActionLog Service Provider.

Laravel 5.1+

```
    'providers' => [
        // ...
        TangJun\SysAuditLog\SysAuditLogServiceProvider::class,
    ]
```

Find the `aliases` key in `config/app.php`.

Laravel 5.1+

```
    'aliases' => [
        // ...
        'SysAuditLog' => TangJun\SysAuditLog\Facades\SysAuditLogFacade::class,
    ]
```

配置
--

[](#配置)

移动配置文件到根目录config下面.

`$ php artisan vendor:publish`

`config/sysauditlog.php`

```
	//填写要记录的日志的模型名称
	return [
	    'entities'=>
            [
		        '\App\Models\Users',
	        ]
    ];
```

创建记录表
-----

[](#创建记录表)

run: `$ php artisan migrate`

Demo
----

[](#demo)

自动记录操作日志，数据库操作需按如下:

```
update

$users = Users::find(1);
$users->name = "myname";
$users->save();

add

$users = new Users();
$users->name = "myname";
$users->save()

delete

Users:destroy(1);
```

主动记录操作日志

```
use SysAuditLog

SysAuditLog::createActionLog(Array $data,$action);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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

Every ~10 days

Total

3

Last Release

2485d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59a09c7331c2b697c80927d03268d2cd68059ddf71a39061e8780f0cfd83eed1?d=identicon)[phptj](/maintainers/phptj)

---

Top Contributors

[![phptj](https://avatars.githubusercontent.com/u/18510201?v=4)](https://github.com/phptj "phptj (5 commits)")

---

Tags

laraveloperation-log

### Embed Badge

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

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

###  Alternatives

[bilfeldt/laravel-request-logger

Log Laravel application request and responses for debugging or statistics

122163.3k2](/packages/bilfeldt-laravel-request-logger)[treblle/security-headers

A collection of HTTP middleware classes to improve the security headers in your Laravel application.

9534.3k](/packages/treblle-security-headers)[insenseanalytics/nova-server-monitor

A Laravel Nova tool for Spatie's Server Monitor library.

6546.9k](/packages/insenseanalytics-nova-server-monitor)[moesif/moesif-laravel

Moesif Collection/Data Ingestion Middleware for Laravel

1065.8k](/packages/moesif-moesif-laravel)[melihovv/laravel-log-viewer

A Laravel log viewer

1231.5k1](/packages/melihovv-laravel-log-viewer)

PHPackages © 2026

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