protected function emailWasChanged(ProfileWasUpdated $event) : bool
    {
        $newEmail = $event->request->get('email');

        return ! is_null($newEmail) && $newEmail != Auth::user()->email;
    }
protected function emailWasChanged(ProfileWasUpdated $event) : bool
    {
        $newEmail = $event->request->get('email');

        return ! is_null($newEmail) && $newEmail != Auth::user()->email;
    }
protected function emailWasChanged ( ProfileWasUpdated $ event ) : bool { $ newEmail = $ event -> request -> get ( 'email' ) ; return ! is_null ( $ newEmail ) && $ newEmail != Auth :: user ( ) -> email ; }
Checks whether the user changed his email address.

@param  ProfileWasUpdated $event

@return bool
Checks whether the user changed his email address .