Created
November 30, 2017 19:44
-
-
Save Naoray/b0cd3b8647c0d1f52cb0ed7da04e8abb to your computer and use it in GitHub Desktop.
This file contains 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 | |
class UpdateContactInformation implements Contract | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function handle($user, array $data) | |
{ | |
$user->forceFill([ | |
'name' => $data['name'], | |
'email' => $data['email'], | |
])->save(); | |
event(new ContactInformationUpdated($user)); | |
return $user; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment