Fixed
Documentation only. No behaviour changed, and no published symbol moved — the
v1.0.0 code is unaffected.
-
H6 prescribed a remedy that cannot run. It told the
reader to setCache-Controlfrom middleware declared insideconditional.
On the path H6 is about — amodelroute whose cached entry successfully
revalidates — that middleware never executes:handle()returns the
short-circuited304before it calls$next($request), so nothing declared
after this middleware is entered at all. The advice named the one position
where the header is guaranteed not to appear.Position was never the discriminator. The outside middleware does run and
does see the304on the way out; Laravel'sSetCacheHeadersloses the header
because it returns early on a contentless response, not because of where it
sits. The remedy is an outside middleware that sets the header
unconditionally, or keeping a cache-policy route offmodel. Inside remains
correct for a304decided after the controller ran —body, ormodel
whenfromRequest()declined — whereattach()marks the real response and
setNotModified()leavesCache-Controlalone. The two cases are now stated
separately rather than collapsed into one claim about ordering. -
docs/placement.mdcarried the same inversion twice, under "What must run
insideconditional" and in its closing nuance. H7 was
already correct and says explicitly that ordering does not help undermodel;
H6 and this page now agree with it. -
docs/api.mdundercounted the API-freeze examples. It said "Four further
examples" inPublicApiTest.phpand listed four; there are five. The missing
one freezes the strategy contract inheritance chain, and it is the only thing
asserting that chain — the signature snapshot records noextends
relationships — for a promise the same page makes a hundred lines earlier.