Differences in same models

Hello guys

Im traying to make a historial of changes of my products and im saving my models status after and before the changes… how can i comparate the differences of my two instances?.


Please elaborate on what are you going to compare.

This module is more focuses on listing who changed what: bedezign/yii2-audit. I think it does more than what you want.

Every record is like

user, date, old attributes, new attributes

The modules does a lot more, but you can deactivate those features

Store changed attributes only - $model->getDirtyAttributes(). See docs.