-
I have added default LogActivity in all my models. Now there is a situation for eg: When I add item stock from stock module 2 crud operations takes place,
As we know by default 2 logs get generated. But I want only 1 log to be recorded for stock insert operation as it is done by user. How can I disable Item update log here ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Got my answer. You can disable all logging activities in the current request by calling activity()->disableLogging(); If you want to enable logging again call activity()->enableLogging(). This is described in the documentation here : https://spatie.be/docs/laravel-activitylog/v4/advanced-usage/disabling-logging |
Beta Was this translation helpful? Give feedback.
Got my answer.
You can disable all logging activities in the current request by calling
activity()->disableLogging();
If you want to enable logging again call activity()->enableLogging().
This is described in the documentation here : https://spatie.be/docs/laravel-activitylog/v4/advanced-usage/disabling-logging