Can you show what you have tried?
Overridden StartSession Middleware not Persisting Session
I am trying to implement a custom StartSession Middleware. No matter what I try, it seems that anything other than the Illuminate StartSession Middleware will not persist the session. I have tried using a class that extends the Illuminate one and I have also tried copying the Illuminate one verbatim (updating the namespace of course). But no matter what I try, the session will not persist. I am using the File session driver. When I use the Illuminate middleware, a session file is created when a page is requested, but not on any custom middleware. Any ideas? Essentially I want to add an event to the session middleware.
Come to find out, the Session Service Provider registers the middleware, so I have to extend the service provider and register my own middleware for it to work.
Please or to participate in this conversation.