asd-lt/action-log 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

asd-lt/action-log

Composer 安装命令:

composer require asd-lt/action-log

包简介

Laravel library for logging desired column changes in models

README 文档

README

Laravel library for logging desired column changes in models

Installation

Use the package manager composer to install Action log.

composer require asd-lt/action-log

Copy migration

php artisan action-log:tables

Run migrations

php artisan migrate

Configuration & Usage

Default guard will be used to link user with log, or it can be defined in auth.php configuration file.

'defaults' => [
    // ...
    'action_log_guard' => 'guard',
],

Attach action log trait to any model, which changes should be logged.

use Asd\ActionLog\Models\Traits\ActionLogTrait;

class Model {
    use ActionLogTrait;
    // ...
}

By default, all columns defined in fillable model attribute will be logged, but if needed it can be limited with additional model attribute loggableFields

class Model {
    // log only these column changes
    protected $loggableFields = [
        'column1',
        'column2',
    ];
}

Additionally, columns can be excluded from logging.

class Model {
    // exclude columns from logging changes
    protected $actionLogAttributesExcept = [
        'column3',
        'column4',
    ];
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

统计信息

  • 总下载量: 1.49k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固