1User::updating(function($user)
2{
3 if ($user->username != $user->getOriginal('username')) {
4 doSomething();
5 }
6
7 // If you need multiple attributes you may use:
8 // $originalAttributes = $user->getOriginal();
9 // $originalUsername = $originalAttributes['username'];
10});