Skip to content

Instantly share code, notes, and snippets.

@Naoray
Created November 30, 2017 19:44
Show Gist options
  • Save Naoray/b0cd3b8647c0d1f52cb0ed7da04e8abb to your computer and use it in GitHub Desktop.
Save Naoray/b0cd3b8647c0d1f52cb0ed7da04e8abb to your computer and use it in GitHub Desktop.
<?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