定制 odinbi/activity-logs-with-trigger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

odinbi/activity-logs-with-trigger

最新稳定版本:v1.6

Composer 安装命令:

composer require odinbi/activity-logs-with-trigger

包简介

Write activity logs use tringger

README 文档

README

Record query history of table in mysql

User Manual

Install package

composer require odinbi/activity-logs-with-trigger

Publish vendor

php artisan vendor:publish --tag=odb-activity-log

Migrate datatable

Run php artisan migrate command to create activity_log_triggers table

php artisan migrate

Or run with folder path option

php artisan migrate --path=database/migrations/2024_01_01_000000_create_activity_log_triggers_table.php

Configuration

Go to app/config/activity-logs-trigger.php to configure the necessary variables

  • table: List of tables to record history
  • middleware_groups: Using middleware for web or api
  • retain_days: Maximum log retention time in days

Schedule

Configure automatic schedule to delete old logs according to retain days, EX:

$schedule->command('logs:clean-old')->dailyAt('01:00');

Command

Create triggers for all tables defined in activity-logs-trigger

php artisan db:create-all-triggers

Add a trigger to any table, php artisan db:create-triggers

. For example to the users table

php artisan db:create-triggers users

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-18