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

DanielJohan's avatar

Logout Redirect Laravel Jetstream

Hello,

After going through the Jetstream Docu, checking out all forums, asking AI, and looking through all the files in my project I wanted to ask if anyone knows where to configure the redirect after logging out in Jetstream.

The redirect after login can be set in the RouteServiceProvider.php, which is great. But I don't see any similar possibility for the logout redirect.

0 likes
3 replies
tykus's avatar
tykus
Best Answer
Level 104

Whenever the authenticated session is destroyed (logout); the Controller returns a LogoutResponse which is implemented at Laravel\Fortify\Http\Responses\LogoutResponse. In there, you can see that it defers to Fortify::redirects, which in turn uses a fortify.redirects.logout config item. You can override this config entry in your config/fortify.php config file, e.g.

// config/fortify.php
return [
    // existing config
    'redirects' => [
        'logout' => '/your-preferred-uri',
    ]
];
2 likes
juanborras's avatar

Would it be possible to use different logout redirects based on the url?

Please or to participate in this conversation.