"Now to create a new way of retrieving an Answer we will declare another resource on the Answer class. To make things work, API Platform needs information about how to retrieve the Answer belonging to the Question, this is done by configuring the uriVariables:"
https://api-platform.com/docs/core/subresources/
Just below the paragraph
"Now to create a new way of retrieving an Answer we will declare another resource on the Answer class. To make things work, API Platform needs information about how to retrieve the Answer belonging to the Question, this is done by configuring the uriVariables:"
The formatting for the php example is wrong.
Cheers