laravel 51 jumps to the specified address after logging in

WBOY
Release: 2016-07-29 09:13:13
Original
1815 people have browsed it

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>
Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!