php - Laravel front-end and back-end separation. How to operate after the client sends the sessionid?
阿神
阿神 2017-05-18 10:48:14
0
1
925

Separation of front-end and back-end of the project
After logging in, use laravel's session to store the information in redis, get the sessionid and return it to the client
How can I use the sessionid to get the session information in redis after the client sends the sessionid next time? , it seems that using the get method of session directly can only pass the key name when storing the session

阿神
阿神

闭关修行中......

reply all(1)
世界只因有你

Implement an http middleware by yourself, get the sessionid from the client in the middleware and then call the session_id() function to set the sessionid document of the current session

Pay attention to the location of the middleware you customized. It should definitely be in front of the middleware that relies on session such as authentication

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template