cetiia / laravel-activity-log
This package is for collect all activity log
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:laravel-package
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
This package is auto-updated.
Last update: 2024-04-29 15:49:07 UTC
README
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 });