I’m using some middlewares, and I would like to pass arguments on the backleg.
Meaning: I would like the equivalent of $request->setAttribute(), e.g. $response->setAttribute() . However, such a function does not exist.
How can I send information to my outer middlewares? The only thing that is returned is the $response, and I don’t see anything that would allow this. I guess I could “hijack” the header/body to set these attributes, then unset them in the outbound middleware, but that seems hardly ideal.
Any ideas for a better solution?