Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TweetResponse's avatar

Redirect after registration

Hey guys, how can I redirect after registration only, not after login? I tried solution here, https://laracasts.com/discuss/channels/general-discussion/laravel-5-redirect-to-url-after-registration?page=1 but none of it working. Thanks in advance

0 likes
2 replies
christopher's avatar
Level 30

You can just override the Register Trait Method

To do so you just need to add the Method to your Auth/AuthController.php to override its redirect path.

 /**
     * Handle a registration request for the application.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function register(Request $request)
    {
        $validator = $this->validator($request->all());
        if ($validator->fails()) {
            $this->throwValidationException(
                $request, $validator
            );
        }
        Auth::guard($this->getGuard())->login($this->create($request->all()));
        return redirect()->route('YOURROUTE'); // Change the Redirect Path
    }
1 like

Please or to participate in this conversation.