Categories
Laravel

Laravel Sessions Gotcha

Lost a lot of time debugging missing values in the Session. They were set in a controller method which I then dd().

Killing the process seems to stop the value being saved in the session. It showed up in that method, but the request didn’t complete so the value was missing from subsequent requests.

Upshot: Let the request complete without dd() to save sesssion values.