Laravel-activitylog: Disable on demand

Created on 30 Jul 2017  路  5Comments  路  Source: spatie/laravel-activitylog

Hi !

is it possible to disable logging on demand with something like that :

User::withoutActivityLog->update($request->all());

It will be useful for example if I have somes scheduled tasks that edit somes fields in user and I don't want to log theses changes in activity_log.

Regards.

Most helpful comment

@Quix0r I'm in holiday atm but based on the corresponding merge commit https://github.com/spatie/laravel-activitylog/blob/ba734a98bfcc38fc4766d784bfedfd55fa379555/composer.json it's everything from laravel 5.1

All 5 comments

I assume your logging model changes. You can only specify on which events you want that. There's currently no other way of disabling/enabling that on the fly.

https://docs.spatie.be/laravel-activitylog/v1/advanced-usage/logging-model-events#customizing-the-events-being-logged

This feature may be coming to the package soon 馃槃

https://twitter.com/LasseRafn/status/891741979322843136

PR: #226

Hi, what is the minimum version of Laravel to be compatible with this change? I have 5.3 here (very old, I know).

@Quix0r I'm in holiday atm but based on the corresponding merge commit https://github.com/spatie/laravel-activitylog/blob/ba734a98bfcc38fc4766d784bfedfd55fa379555/composer.json it's everything from laravel 5.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hesesses picture Hesesses  路  5Comments

marky291 picture marky291  路  4Comments

ekandreas picture ekandreas  路  3Comments

ianrussel picture ianrussel  路  5Comments

uyab picture uyab  路  4Comments