Skip to content

Commit

Permalink
Update subresources.md (#1888)
Browse files Browse the repository at this point in the history
fixed a couple formatting issues that broke the layout.
  • Loading branch information
lifo101 committed Mar 18, 2024
1 parent c7c079c commit dd973fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/subresources.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ To make things work, API Platform needs informations about how to retrieve the `
the `Question`, this is done by configuring the `uriVariables`:

<code-selector>

```php
<?php
// api/src/Entity/Answer.php
Expand Down Expand Up @@ -139,8 +140,8 @@ If we had a `relatedQuestions` property on the `Answer` we could retrieve the co
Note that in this example, we declared an association using Doctrine only between Employee and Company using a ManyToOne. There is no inverse association hence the use of `toProperty` in the URI Variables definition.

The following declares a few subresources:
- `/companies/{companyId}/employees/{id}` - get an employee belonging to a company
- `/companies/{companyId}/employees` - get the company employee's
* `/companies/{companyId}/employees/{id}` - get an employee belonging to a company
* `/companies/{companyId}/employees` - get the company employee's

```php
<?php
Expand Down

0 comments on commit dd973fb

Please sign in to comment.