Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Activity Logs

Simple and Usefull Activity Log for Laravel.

Installation

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

Usage

Auto Logging

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'

Manual Logging

on your controller, write this code :

use Yudhatp\ActivityLogs\ActivityLogs;
ActivityLogs::log(auth()->user()->id, $request->ip(), 'Profile', 'View/Edit Profile');

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

About

Simple & Usefull Activity Log for Laravel

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages