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 tablephp artisan db:create-triggers users
统计信息
- 总下载量: 75
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-18