ホーム > Laravel > How to change the redirect destination after logging in with Laravel
Laravel

How to change the redirect destination after logging in with Laravel

Thank you for your continued support.
This article contains advertisements that help fund our operations.

Table Of Contents

  1. Implementation
  2. Summary

⇨ Click here for the table of contents for Laravel articles

I will write about how to change the redirect destination after implementing login authentication in Laravel.

This is for those who have implemented login authentication.

Implementation

If you don't specify anything, it will go to 'home', if you want to go to '/', it will look like this.

Auth/LoginController

// Add this function
// Overriding the function that originally specified 'home'
public function redirectPath()
    {
        // return 'desired url';
        return '/';
    }

Summary

There are many articles like this, I hope it is helpful for reference.

That's all.

Popular Articles

Deploying a PHP7.4 + Laravel6 project to AWS EC2

Please Provide Feedback
We would appreciate your feedback on this article. Feel free to leave a comment on any relevant YouTube video or reach out through the contact form. Thank you!