Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. static::saving(function($model)
  2. {
  3. foreach($model->getDirty() as $attribute => $value){
  4. $original= $model->getOriginal($attribute);
  5. echo "Changed $attribute from '$original' to '$value'<br/>rn";
  6. }
  7. return true; //if false the model wont save!
  8. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement