Skip to content

Instantly share code, notes, and snippets.

@jovanialferez
Created December 11, 2018 00:40
Show Gist options
  • Save jovanialferez/c4ac44980d6719ba7b908c2186fc6c65 to your computer and use it in GitHub Desktop.
Save jovanialferez/c4ac44980d6719ba7b908c2186fc6c65 to your computer and use it in GitHub Desktop.
bypass laravel auto-login on registration
/**
* 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