lewis15520/auditeer 问题修复 & 功能扩展

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

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

lewis15520/auditeer

Composer 安装命令:

composer require lewis15520/auditeer

包简介

A package to audit requests and model data within laravel

README 文档

README

A package to audit requests and model data in Laravel

Requirements

  • PHP 7.3 or later
  • Laravel 8 or later

Installation

In order to run Auditeer you are required to follow these steps in your terminal

  1. Install the package with composer require lewis15520/auditeer
  2. Copy the required package conents with php artisan vendor:publish --provider="Lewis15520\Auditeer\app\Providers\AuditeerServiceProvider"
  3. Install the package migrations with php artisan migrate

Usage

Enabling

To start auditing, go to config/auditeer.php and set the enabled value to true.

Config

The config is for you to configure Auditeer how you want it. There's documentation for each option and what it does. You can turn these on or off at any time.

Traits

The Auditeer trait is for you to asign to your own models. This allows you to track old and new data and the change log will be stored in the parameters field. To do this, you first need to enable track_model_changes in the config by setting it to true. On each mode you would like to track, you can add use Lewis15520\Auditeer\Traits\AuditLog; and then inside the model class, add use AuditLog;. To test this works properly for you, make an update on a single object and check the audit view for that change. If there is model_changes in the parameters, this is successfully working.

Viewing recorded data

Viewing your Auditeer data is as easy as setting the enable_views option to true in the config and going to {base_url}/auditeer_data in your url. Auditeer will provide you with a nice single page interface for you to look at and read your logs. You can edit the page settings in the config under the view_config section.

Displaying user data

Under view_config > user in the config, you can edit how the user is shown in the audit log data views. You can define the model class the user is from (the default is set to \App\Models\User::class). Inside the display_column key, you can define column names to show the relevant data you would like to see (e.g name or email). You can also concatinate columns with a | inbetween (e.g name|email). The first one in the value will display normally and every column after will be put into its own brackets and will be displayed like the following: Jon Doe (jon.doe@example.com).

lewis15520/auditeer 适用场景与选型建议

lewis15520/auditeer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 627 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 11 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 lewis15520/auditeer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 lewis15520/auditeer 我们能提供哪些服务?
定制开发 / 二次开发

基于 lewis15520/auditeer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: mit
  • 更新时间: 2020-11-08