PHPackages                             virtualorz/actionlog - 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. virtualorz/actionlog

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

virtualorz/actionlog
====================

0.0.9(6y ago)01041HTML

Since Jun 24Pushed 6y agoCompare

[ Source](https://github.com/virtualorz/actionLog)[ Packagist](https://packagist.org/packages/virtualorz/actionlog)[ RSS](/packages/virtualorz-actionlog/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (10)Used By (1)

Usage
=====

[](#usage)

Use for Laravel website to log CRUD befor after value

Install
=======

[](#install)

```
composer require virtualorz/actionLog

```

Config
======

[](#config)

edit config/app.php

```
'providers' => [
    ...
    Virtualorz\ActionLog\ActionLogServiceProvider::class
]

'aliases' => [
    ...
    'ActionLog' => Virtualorz\ActionLog\Facades\ActionLog::class,
]

```

Publish data
============

[](#publish-data)

```
php artisan vendor:publish --provider="Virtualorz\ActionLog\ActionLogServiceProvider"

```

Run Migration
=============

[](#run-migration)

```
php artisan migrate --path=/vendor/virtualorz/actionlog/src/migrations

```

Edit Config
===========

[](#edit-config)

edit config/actionLog\_logAction ,
for three type to the name you want

Method
======

[](#method)

###### pushBefore($key, $value)

[](#pushbeforekey-value)

```
add before value to object manual, $key for table name, $value for row value

```

###### pushAfter($key, $value)

[](#pushafterkey-value)

```
add after value to object manual, $key for table name, $value for row value

```

###### save($page,$action,$remark,$object = null,$target\_id = null)

[](#savepageactionremarkobject--nulltarget_id--null)

```
save before after value to database,
$page for page name,
$action for action type, the key of log_action,
$remark for remark text,
$object = null for model object , if null will get the before and after value add manual
$target_id = null for modify target id, if null will get the primary if in model object
save the model object before after value to database

```

###### logList($page=15)

[](#loglistpage15)

```
return the log list result paginate by $page

```

###### logContent($id)

[](#logcontentid)

```
return the content HTML of log id=$id,
you can use {!! $RESULT_HTML !!} in blade to show the log content
$RESULT_HTML for logContent() method result

```

Example for manual add value
============================

[](#example-for-manual-add-value)

```
ActionLog::pushBefore('system_permission', system_permission::where('member_id', $request->get('id'))->get());
...
//do some thing
...
ActionLog::pushAfter('system_permission', system_permission::where('member_id', $request->get('id'))->get());

ActionLog::save(Route::getCurrentRoute()->action['parent'],0,'remark text',null,$request->get('id'));

```

Example for save model value
============================

[](#example-for-save-model-value)

```
ActionLog::save(Route::getCurrentRoute()->action['parent'],2,'remark text',$system_permission);

```

中文版本文件
======

[](#中文版本文件)

[ActionLog : 紀錄網站每筆資料操作記錄](http://www.alvinchen.club/2019/06/28/%e4%bd%9c%e5%93%81laravel-package-actionlog-%e7%b4%80%e9%8c%84%e7%b6%b2%e7%ab%99%e6%af%8f%e7%ad%86%e8%b3%87%e6%96%99%e6%93%8d%e4%bd%9c%e8%a8%98%e9%8c%84/)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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 ~1 days

Total

9

Last Release

2508d ago

### Community

Maintainers

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

---

Top Contributors

[![alvin-js](https://avatars.githubusercontent.com/u/59727853?v=4)](https://github.com/alvin-js "alvin-js (11 commits)")

### Embed Badge

![Health badge](/badges/virtualorz-actionlog/health.svg)

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

###  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)
