Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created September 21, 2017 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/8c06fa81bc37f51e34949c4f3c04a8dd to your computer and use it in GitHub Desktop.
Save uno-de-piera/8c06fa81bc37f51e34949c4f3c04a8dd to your computer and use it in GitHub Desktop.
<?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