Created
September 29, 2019 15:49
-
-
Save MaheKarim/b560b8df18995f908eb385256b88664b to your computer and use it in GitHub Desktop.
Disable Auto Login After Registration
This file contains hidden or 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
// Add This Code To Register Controller | |
use Illuminate\Http\Request; | |
use Illuminate\Auth\Events\Registered; | |
public function register(Request $request) | |
{ | |
$this->validator($request->all())->validate(); | |
event(new Registered($user = $this->create($request->all()))); | |
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