spatie/laravel-activitylog
Log user and model activity in Laravel with a simple API. Automatically record Eloquent events, track subjects and causers, attach custom properties, and query everything via the Activity model. Stores logs in the activity_log table.
You can disable all logging globally for the current request by calling
activity()->disableLogging();
If you want to enable logging again, call activity()->enableLogging().
If you want to run a block of code without any logging, you can use the withoutLogging() method.
activity()->withoutLogging(function () {
// ...
});
Everything that would produce an activitylog (model events, explicit calls) won't save an activity.
To disable logging for a specific model instance instead of globally, see the per-model disabling section.
How can I help you explore Laravel packages today?