Created
November 30, 2017 19:48
-
-
Save Naoray/1aa5cfdddfdcfa3261f07adae4106be1 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 SparkServiceProvider | |
{ | |
public function booted() | |
{ | |
Spark::swap('UpdateContactInformatio@handle', function ($user, array $data) { | |
$user->forceFill([ | |
'name' => $data['name'], | |
'email' => $data['email'], | |
'phone' => $data['phone'] | |
])->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