Skip to content

cetiia/laravel-activity-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package is for collect all activity log

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require cetiia/laravel-activity-log

You can publish and run the migrations with:

php artisan vendor:publish --tag="activity-log-migrations"
php artisan migrate

Optionally, you can publish the views using

php artisan vendor:publish --tag="laravel-activity-log-views"

Usage

After migrate automatically save data to the logs table, You can see the route activity-log

Protect the route: Add to app/Providers/AuthServiceProvider.php in boot method

Gate::define('activity-log', function (User $user) {
    // add logic to validate if user can access to route
    // Example using novatopro/lrp (Laravel role permission)
    // return $user->can('access','activity-log'); // activity-log is permission slug
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published