Created
September 21, 2017 15:36
-
-
Save uno-de-piera/8c06fa81bc37f51e34949c4f3c04a8dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
protected static function boot() { | |
parent::boot(); | |
self::updating(function($user) { | |
if($user->isDirty('email')) { //si ha cambiado el correo | |
$user->notify( | |
new EmailChanged | |
); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment