Laravel session does not work in the controller

scenario is front-end separation (vue+laravel). When login verification is successful, the backend returns sessionID, using the default file storage session, that comes with laravel. Startsession, has been used in middleware. Here should be no problem.
as shown in the figure, I write session directly in the route that can be stored

tokensessionIDsession

.

I tried methods such as session- > save (), $request- > session- > save (), and none of them succeeded.
also read on the Internet that laravel uses files to store session with bug, but such a popular framework should not have such a problem.
is a little confused. I don"t know what the problem is.


check session.save_path in php.ini . If there is a ; comment, remove the semicolon, and then manually specify a directory with write permission, such as: session.save_path = / tmp , restart php-fpm (or Apache ) and try

again.
Menu