79082354

Date: 2024-10-13 03:40:53
Score: 1
Natty:
Report link

for achieve multiple collection URIs in API Platform 3, the key which lies in configuring the resources correctly to allow both /reports and /admin/reports collections to coexist with different normalization contexts.

In your current setup, the problem is that you're defining two #[ApiResource] attributes on the same class, which API Platform interprets as conflicting configurations. To resolve this, you need to define different URIs with custom operations within a single #[ApiResource] declaration.

That what I can understand.., Feel free to correct me, and explain If I am assuming it wrong.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rkssh