Home  >  Article  >  Backend Development  >  Cannot obtain login information after laravel5.2 user authentication

Cannot obtain login information after laravel5.2 user authentication

WBOY
WBOYOriginal
2016-08-18 09:16:001399browse

After I log in using the user authentication of laravel5.2, I can get the user information by printing directly in the login method. When jumping to other controllers, the user login information cannot be read, and Auth:user() prints out empty.
The environment is mac+nginx+php+mysql

Here is where you can get user login information
Cannot obtain login information after laravel5.2 user authentication

But after logging out, the user information cannot be obtained. The following is my routing configuration
Cannot obtain login information after laravel5.2 user authentication

Later I deployed my project in Windows, and there was no problem with user authentication and it could be used normally. May I ask what extensions are required for the development environment of laravel5.2 or are there other reasons?

Reply content:

After I log in using the user authentication of laravel5.2, I can get the user information by printing directly in the login method. When jumping to other controllers, the user login information cannot be read, and Auth:user() prints out empty.
The environment is mac+nginx+php+mysql

Here is where you can get user login information
Cannot obtain login information after laravel5.2 user authentication

But after logging out, the user information cannot be obtained. The following is my routing configuration
Cannot obtain login information after laravel5.2 user authentication

Later I deployed my project in Windows, and there was no problem with user authentication and it could be used normally. May I ask what extensions are required for the development environment of laravel5.2 or are there other reasons?

Some versions after laravel 5.2 do not require the web middleware. Would you like to see it again?

There is also a video tutorial on deployment: https://laravist.com/series/d...

Statement:
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