src/Controllers/Auth/RegistrationController.php
public function getActivate(Request $request, $code)
    {
        // Attempt the registration
        $result = $this->authManager->activate($code);

        if ($result->isFailure()) {
            // Normally an exception would trigger a redirect()->back() However,
            // because they get here via direct link, back() will take them
            // to "/";  I would prefer they be sent to the login page.
            $result->setRedirectUrl(route('auth.login.form'));
            return $result->dispatch();
        }

        // Ask the user to check their email for the activation link
        $result->setMessage('Registration complete.  You may now log in.');

        // There is no need to send the payload data to the end user
        $result->clearPayload();

        // Return the appropriate response
        return $result->dispatch(route('dashboard'));
    }
public function getActivate(Request $request, $code)
    {
        // Attempt the registration
        $result = $this->authManager->activate($code);

        if ($result->isFailure()) {
            // Normally an exception would trigger a redirect()->back() However,
            // because they get here via direct link, back() will take them
            // to "/";  I would prefer they be sent to the login page.
            $result->setRedirectUrl(route('auth.login.form'));
            return $result->dispatch();
        }

        // Ask the user to check their email for the activation link
        $result->setMessage('Registration complete.  You may now log in.');

        // There is no need to send the payload data to the end user
        $result->clearPayload();

        // Return the appropriate response
        return $result->dispatch(route('dashboard'));
    }
public function getActivate ( Request $ request , $ code ) { // Attempt the registration $ result = $ this -> authManager -> activate ( $ code ) ; if ( $ result -> isFailure ( ) ) { // Normally an exception would trigger a redirect()->back() However, // because they get here via direct link, back() will take them // to "/";  I would prefer they be sent to the login page. $ result -> setRedirectUrl ( route ( 'auth.login.form' ) ) ; return $ result -> dispatch ( ) ; } // Ask the user to check their email for the activation link $ result -> setMessage ( 'Registration complete.  You may now log in.' ) ; // There is no need to send the payload data to the end user $ result -> clearPayload ( ) ; // Return the appropriate response return $ result -> dispatch ( route ( 'dashboard' ) ) ; }
Activate a user if they have provided the correct code
@param  string $code
@return Response|Redirect
Activate a user if they have provided the correct code