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.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications