Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static::saving(function($model)
- {
- foreach($model->getDirty() as $attribute => $value){
- $original= $model->getOriginal($attribute);
- echo "Changed $attribute from '$original' to '$value'<br/>rn";
- }
- return true; //if false the model wont save!
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement