Simple & Usefull Activity Log for Laravel 6.x, 7.x, 8.x, 9.x, 10,x.
You can install the package via composer:
composer require yudhatp/laravel-activity-logs
You can publish and run the migrations with:
php artisan migrate
You can publish config file with:
php artisan vendor:publish --tag=yudhatp-activity-logs-config
on "kernel.php", add this line on your "protected $middlewareGroups"
'web' => [
...
\Yudhatp\ActivityLogs\Middleware\ActivityLogMiddleware::class,
...
],
in the config file, you can determine what data will be stored in "user_id". at default, the data that will be stored is the "id" field but you can manually change this at "user" data. for example :
'user' => 'employee_id'
on your controller, write this code :
use Yudhatp\ActivityLogs\ActivityLogs;
ActivityLogs::log(auth()->user()->id, $request->ip(), 'Profile', 'View/Edit Profile');
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.