Created
December 11, 2018 00:40
-
-
Save jovanialferez/c4ac44980d6719ba7b908c2186fc6c65 to your computer and use it in GitHub Desktop.
bypass laravel auto-login on registration
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
/** | |
* Overridden to not auto-login user after registration. | |
* | |
* @inheritdoc | |
*/ | |
public function register(Request $request) | |
{ | |
$this->validator($request->all())->validate(); | |
$user = $this->create($request->all()); | |
event(new Registered($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