Old props not being saved in properties column #40
-
Hello, Whenever I update a model, old properties are not being saved in the activity log. Is there an option to activate this feature? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Disable logging from this package, via config file, and use 'logging-model-events' functionality provided by https://spatie.be/docs/laravel-activitylog/v4/advanced-usage/logging-model-events |
Beta Was this translation helpful? Give feedback.
-
@Z3d0X I was also confused in the beginning and after a deep dive into the source code, I found out that the package's logger structures the logs differently. |
Beta Was this translation helpful? Give feedback.
-
For anyone who finds this in an attempt to save the old + new props. I extended the ResourceLogger and then added an altered update function that looks for changes and gets their corresponding original value for the log entry.
|
Beta Was this translation helpful? Give feedback.
Disable logging from this package, via config file, and use 'logging-model-events' functionality provided by
spatie/laravel-activitylog
.https://spatie.be/docs/laravel-activitylog/v4/advanced-usage/logging-model-events