In laravel 5.1, laravel uses its own function to log in. After logging in, it will jump to the home address by default. Basically, this is enough.
It’s just that I want it to jump to another specified address, such as admin.
So what should I do?
It’s very simple:
" app/Http/Controllers/Auth/AuthController.php" this file, add
<span>protected </span><span>$redirectPath </span><span>= </span><span>'admin'</span><span>;</span>
Log in again and it’s successful.
The above introduces laravel 51 to jump to the specified address after logging in, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.