alexjose/audit-log 问题修复 & 功能扩展

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

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

alexjose/audit-log

最新稳定版本:v2.0.4

Composer 安装命令:

composer require alexjose/audit-log

包简介

Log audits events

README 文档

README

Build Status Total Downloads Latest Stable Version License

AuditLog - Log audit events using the Monolog

This library aims to log the critical changes happening in the application. This tracks the changes and the source of the events.

Installation

composer require alexjose/audit-log

Basic Usage

$auditLog = new AuditLog();
$auditLog->log([
    'New User Registerd',
    'User',
    'creation',
    1,
    'user',
    'alex@example.com',
    [
        'username' => 'john',
        'email' => 'john@example.com'
    ],
    null,
    1,
    'user',
    'alex@example.com',
]);

Signature of log()

log() will accept an instance of Event or an array with the attributes of the Event.

    /**
     * @param Event|array $event
     */
    public function log($event): void

Signature of new Event()

    /**
     * @param string $message The title of the log
     * @param string $event The unique name of event
     * @param string $entityId The id of the entity which got modified
     * @param string $entityType The type to entity which got modified
     * @param string $entityTitle The title of the entity which got modified
     * @param array $newValues The new values of the entity
     * @param array|null $oldValues The old values of the entity
     * @param string $userId The id of the user who made the change
     * @param string $userType The type of the user who made the change
     * @param string $username The username of the user who made the change
     */
    public function __construct(
        $message,
        $module,
        $event,
        $entityId,
        $entityType,
        $entityTitle,
        $newValues,
        $oldValues,
        $userId,
        $userType,
        $username
    ):void

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-25