Architecture and request · Question 12 of 12
Middleware A is registered in RequestMiddlewares.php with before => ['vendor/middleware-b']. Which statements apply?
2 answers are correct. Hard
Show answer
Answer
- B A receives the response of B and can still modify it afterwards
- D A can modify the request before B receives it
Explanation
A middleware placed before another one wraps it: code before $handler->handle() affects the request, code after it affects the response of the inner middleware.