[Laravel Breeze] Redirect back after login and registration

Published: 10 May 2021
on channel: cdruc
10k
141

Let's say you're on a product page and you log in. You would expect to be redirected back to the product page, not to the homepage.

By default, Laravel redirects users to the home route after they login or create a new account. But sometimes it makes sense to redirect them back to the page they were on before.

Here's how you can redirect back after login and registration in applications using Laravel Breeze.

Code snippets:


Watch video [Laravel Breeze] Redirect back after login and registration online, duration 04 minute 32 second in high hd quality that is uploaded to the channel cdruc 10 May 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 10 thousand times and liked it 141 visitors.