haruncpi / laravel-user-activity

Monitor user activity easily!
https://laravelarticle.com/laravel-user-activity
425 stars 55 forks source link

Changes the original models' data to raw original #19

Closed samuelhgf closed 3 years ago

samuelhgf commented 3 years ago

Hi, the logToDb methods in Loggable trait is using the getOriginal() method from the Model

But in case the model have some mutator, it will be save as a modification even there was none

To fix this, I changed to instead call getOriginal() call getRawOriginal(), so even the model has mutators it wont be trigged.