spatie/laravel-activitylog
Log user and model activity in Laravel with a simple API. Automatically record Eloquent model events, link actions to subjects and causers, store custom properties, and query a dedicated activity_log table for auditing and history.
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?