Skip to content

Commit d977c96

Browse files
Fix typo on subresourceOperations.access_control
1 parent 052d53a commit d977c96

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/operations.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,19 +468,18 @@ The `subresourceOperations` attribute also allows you to add an access control o
468468

469469
```php
470470
<?php
471-
// api/src/Entity/Question.php
471+
// api/src/Entity/Answer.php
472472
473473
/**
474474
* ...
475475
* @ApiResource(
476476
* subresourceOperations={
477-
* "answer_get_subresource"= {
478-
* "method"="GET",
477+
* "api_questions_answer_get_subresource"= {
479478
* "access_control"="has_role('ROLE_AUTHENTICATED')"
480479
* }
481480
* }
482481
* )
483-
class Question
482+
class Answer
484483
{
485484
}
486485
```

0 commit comments

Comments
 (0)