nzhibv/redis-logs

使用redis的员工活动日志

1.0.5 2021-04-06 07:58 UTC

This package is auto-updated.

Last update: 2024-09-06 15:39:31 UTC


README

使用redis的员工活动日志

在config app.php中添加Provider

Nghibv\Redislogs\ActivityLogsServiceProvider::class

运行

php artisan migrate

数据集

$params = [
    'title' => 'This is title of Activity Log '. time(),
    'causer_id' => 72,
    'causer_name' => buivannghi1991@gmail.cpm,
    'method' => 'GET',
    'route' => '/employees/activity',
    'model' => 'Employees',
    'description' => 'Get employees list',
    'old' => '',
    'new' => '',
]

存储活动日志

$activity = new ActivityLogService();
$activityResponse = $activity->redisActivity($params);

索引活动日志

$memories = new ActivityLogService();
$list = $memories->index($request);

在后台运行命令

php artisan biz-activity-logs:process-caching-redis

或配置计划