I have a strange problem with Laravel 5.1 application.
Intermittently, his session decline data. I discovered this by writing some middleware that writes the session contents for this request to a log file. Although the session identifier ( Session::getId() ) does not change, the _token value in the session data obtained using Session::all() is executed.
As I said, this happens intermittently. I can update the same URL several times, and then randomly update the remaining session data and _token values different from previous requests.
What can cause this? Ive also noticed that the flash object is not in the “discarded” session data.
The following is a snippet of the log. You can see that the contents of the session_data key randomly change the “form” in the last two lines, but the session identifier remains constant.
Also, not sure if this is appropriate, but I have a DebugBar .

UPDATE:. While debugging, Ive found that on some page loads the session is completely empty, as in no _token (therefore, a new one is generated). Nothing.
source share