nghibv/redis-logs

Activity logs employees using redis

1.0.5 2021-04-06 07:58 UTC

This package is auto-updated.

Last update: 2024-05-06 15:04:43 UTC


README

Activity logs employees using redis

In config app.php add Provider:

Nghibv\Redislogs\ActivityLogsServiceProvider::class

Run:

php artisan migrate

Data Set:

$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' => '',
]

Store Activity Logs:

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

Index Activity Logs:

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

Run command background:

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

Or Config Schedule