PHPackages                             arthuryinzhen/php-action-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. arthuryinzhen/php-action-log

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

arthuryinzhen/php-action-log
============================

A laravel package of action log

081PHP

Since Jul 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Arthuryin/php-action-log)[ Packagist](https://packagist.org/packages/arthuryinzhen/php-action-log)[ RSS](/packages/arthuryinzhen-php-action-log/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

action-log
==========

[](#action-log)

Laravel 5 操作日志自动记录

Installation
------------

[](#installation)

The ActionLog Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `arthuryinzhen/php-action-log` package and setting the `minimum-stability` to `dev` (required for Laravel 5) in your project's `composer.json`.

```
{
    "require": {

        "arthuryinzhen/php-action-log": "dev-master"
    },

}
```

or

Require this package with composer:

```
composer require luoyangpeng/action-log dev-master

```

Update your packages with `composer update` or install with `composer install`.

In Windows, you'll need to include the GD2 DLL `php_gd2.dll` as an extension in php.ini.

Usage
-----

[](#usage)

To use the ActionLog Service Provider, you must register the provider when bootstrapping your Laravel application. There are essentially two ways to do this.

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

```
    'providers' => [
        // ...
        'arthuryinzhen\ActionLog\ActionLogServiceProvider',
    ]
```

for Laravel 5.1+

```
    'providers' => [
        // ...
        arthuryinzhen\ActionLog\ActionLogServiceProvider::class,
    ]
```

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

```
    'aliases' => [
        // ...
        'ActionLog' => 'arthuryinzhen\ActionLog\Facades\ActionLogFacade',
    ]
```

for Laravel 5.1+

```
    'aliases' => [
        // ...
        'ActionLog' => arthuryinzhen\ActionLog\Facades\ActionLogFacade::class,
    ]
```

Configuration
-------------

[](#configuration)

To use your own settings, publish config.

`$ php artisan vendor:publish`

`config/action-log.php`

```
	return [
	    //填写要记录的日志的模型名称
	    'models' => [
		    '\App\models\User',
        ],

		// 填写监视类别, 默认为admin 该参数为auth相关
        'guards' => [
            'admin',
        ],
	];
```

for Laravel 5.1+

```
	return [
	    //填写要记录的日志的模型名称
	    'models' => [
		    \App\models\User::class,
        ],

		// 填写监视类别, 默认为admin 该参数为auth相关
        'guards' => [
            'admin',
        ],
	];
```

Last Step
---------

[](#last-step)

run: `$ php artisan migrate`

Demo
----

[](#demo)

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

```
update

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

add

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

delete

Users:destroy(1);
```

主动记录操作日志

```
use ActionLog

ActionLog::createActionLog($type,$content);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0401b7832f7ed404f26c8477e4b32131b08343f21827396edd99bb781bf20c5b?d=identicon)[Arthuryin](/maintainers/Arthuryin)

### Embed Badge

![Health badge](/badges/arthuryinzhen-php-action-log/health.svg)

```
[![Health](https://phpackages.com/badges/arthuryinzhen-php-action-log/health.svg)](https://phpackages.com/packages/arthuryinzhen-php-action-log)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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