Created
May 18, 2018 18:35
-
-
Save thannaske/91babc21582946f23ac2f9bd9e2a7243 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 | |
// [...] | |
/** | |
* Handle a registration request for the application. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @return \Illuminate\Http\Response | |
*/ | |
public function register(Request $request) | |
{ | |
$this->validator($request->all())->validate(); | |
// This is the point of interest! | |
event(new Registered($user = $this->create($request->all()))); | |
$this->guard()->login($user); | |
return $this->registered($request, $user) | |
?: redirect($this->redirectPath()); | |
} | |
// [...] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment