Skip to content

Commit f113a46

Browse files
authored
Merge pull request #371 from aitboudad/dto
[DTO] add define custom loader paths step.
2 parents e0e6775 + dacc168 commit f113a46

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

core/dto.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,17 @@ In this case, we disable all operations except `POST`.
4242
Then, thanks to [the event system](events.md), it's possible to intercept the
4343
`POST` request and to handle it.
4444

45-
First, an event subscriber is needed:
45+
First, we should define a custom loader paths and create an event subscriber:
46+
47+
* define a custom loader paths for `Api/Dto`:
48+
49+
```yaml
50+
api_platform:
51+
mapping:
52+
paths: ['%kernel.project_dir%/src/Api/Dto']
53+
```
54+
55+
* create an event subscriber:
4656
4757
```php
4858
<?php

0 commit comments

Comments
 (0)