0

创建或删除项目时,是否可以只记录脏属性updated并将列留空?properties

我目前正在使用laravel-activitylog ^3.17,到目前为止,这是我的代码:

use LogsActivity;

protected static $logName = 'system';
protected static $logAttributes = ['*'];
protected static $logOnlyDirty = true;
protected static $submitEmptyLogs = false;
protected static $logAttributesToIgnore = ['id', 'created_at', 'updated_at', 'deleted_at'];

这会在创建或删除项目时记录所有属性。

例如,当我创建某事时,这是保存到properties日志表列的内容:

{"attributes": {"name": "test", "description": "Description"}}
4

0 回答 0