Skip to content

Commit 528497d

Browse files
committed
Add docs about URL rules config
1 parent 136cea8 commit 528497d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,12 @@ paths:
347347
It won't generate `actionCreateInvoice` in `PaymentsController.php` file, but will generate `actionInvoice` instead in
348348
same file.
349349

350+
Generated URL rules config for above is (in `urls.rest.php` or pertinent file):
351+
```php
352+
'POST payments/invoice/<invoice:\d+>' => 'payments/invoice',
353+
'payments/invoice/<invoice:\d+>' => 'payments/options',
354+
```
355+
350356
Also, if same action is needed for HTTP GET and POST then use same value for `x-route`. Example:
351357

352358
```yaml
@@ -370,6 +376,13 @@ paths:
370376
description: The Response
371377
```
372378

379+
Generated URL rules config for above is (in `urls.rest.php` or pertinent file):
380+
```php
381+
'GET a1/b1' => 'abc/xyz',
382+
'POST a1/b1' => 'abc/xyz',
383+
'a1/b1' => 'abc/options',
384+
```
385+
373386
## Many-to-Many relation definition
374387

375388
There are two ways for define many-to-many relations:

0 commit comments

Comments
 (0)