title: Yii2 before save check if attributes are changed
body: <p>I want to check if some attributes in my model are changed in <code>beforeSave()</code> method according to data stored in database.</p>
  
  <p>Is there some best practice to check if model has changed?</p>
  
  <p>My goal si to make history. If some attribute changes, I save a copy into <code>model_history</code> table.</p>