Excuse me, how to store, get the value and clear the session in laravel5.2.
I followed the documentation, but after storing it in controller A, I could not get the value in controller B.
迷茫2017-05-16 16:52:26
// 存值
$request->session->put(key,value);
// 取值
$request->session->get(key);
// 清空
$request->session->flush()
You can read the documentation
http://laravelacademy.org/post/3261.html
迷茫2017-05-16 16:52:26
The laravel file is really too rough. The session is probably a trap for many people. If it is not a normal return control layer function, you need to call session()->save()
某草草2017-05-16 16:52:26
There are two main points to pay attention to when using session add, delete, modify and check:
First, the session.php configuration is correct;
Second, the add, delete, modify, and check functions are not written incorrectly.
For the source code analysis of session, please see: Laravel Study Notes: Session Source Code Analysis (Part 1)