Skip to content

Instantly share code, notes, and snippets.

@thannaske
Created May 18, 2018 18:35
Show Gist options
  • Save thannaske/91babc21582946f23ac2f9bd9e2a7243 to your computer and use it in GitHub Desktop.
Save thannaske/91babc21582946f23ac2f9bd9e2a7243 to your computer and use it in GitHub Desktop.
<?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