Skip to content

Commit 03e0986

Browse files
Add YAML configuration for messenger
1 parent 3c9e4b3 commit 03e0986

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

core/messenger.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ final class ResetPasswordRequest
4848
}
4949
```
5050

51+
Alternatively, you can use the YAML configuration format:
52+
53+
```yaml
54+
# api/config/api_platform/resources.yaml
55+
resources:
56+
App\Entity\ResetPasswordRequest:
57+
collectionOperations:
58+
post:
59+
status: 202
60+
itemOperations: []
61+
attributes:
62+
messenger: true
63+
output: false
64+
```
65+
5166
Because the `messenger` attribute is `true`, when a `POST` is handled by API Platform, the corresponding instance of the `ResetPasswordRequest` will be dispatched.
5267

5368
For this example, only the `POST` operation is enabled.

0 commit comments

Comments
 (0)