diff --git a/content/php/beginner/3.md b/content/php/beginner/3.md index 57553c4..0ca3976 100644 --- a/content/php/beginner/3.md +++ b/content/php/beginner/3.md @@ -264,10 +264,10 @@ Also notice we're *not* adding this to `routes.php` — the `#[FrontpageRoute]` ```bash # Run from: ~/nextcloud-docker-dev/ -./scripts/occ.sh nextcloud -- router:list | grep pinboard +./scripts/occ.sh nextcloud -- router:list pinboard ``` -You should see both `pinboard.page.index` and `pinboard.page.get_pins` listed. +`router:list` takes an app ID, so you get just your app's routes without having to filter the full list. You should see both `pinboard.page.index` and `pinboard.page.get_pins` listed. --- @@ -328,15 +328,21 @@ Expected response: `[]` — `JSONResponse` returns your data directly without an ```bash # Run from: ~/nextcloud-docker-dev/ -./scripts/occ.sh nextcloud -- router:list | grep pinboard +./scripts/occ.sh nextcloud -- router:list pinboard ``` You should see at minimum: ``` - pinboard.page.index GET /index.php/apps/pinboard/ - pinboard.page.get_pins GET /index.php/apps/pinboard/pins ++------------------------+---------+-------------------------------+ +| route | request | path | ++------------------------+---------+-------------------------------+ +| pinboard.page.get_pins | GET | /index.php/apps/pinboard/pins | +| pinboard.page.index | GET | /index.php/apps/pinboard/ | ++------------------------+---------+-------------------------------+ ``` +Routes are listed alphabetically by name, so `get_pins` comes before `index`. + --- ## Common problems