I’m wondering if there is any built-in way to attach a PHP object or array to the Response so that middleware could possibly manipulate some parameters before finally outputting it to the user as JSON.
Does the response object have something that would be the equivalent of withAttribute that I could use for that?
Reading up more on this and it sounds like this should actually be passed around on the request. Does that sound right?
Actually I don’t think this is correct after all. Looks like once you call handle, you wouldn’t really be able to add things to the request. So I do need to be putting stuff on response somehow
I’m not sure if this is a good design. What specific use case do you have? What is the purpose?
Yeah actually I’m rethinking things a bit. Thanks