From 915ce33044a29fafda2834cb2d0b0035e355ddea Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Mon, 10 Aug 2026 10:46:30 +0200 Subject: [PATCH] docs(php-beginner): show the real router:list output in module 3 Follow-up to #48. The command was fixed there, but the expected-output block underneath still showed borderless columns, so readers hit a second mismatch right after the first one was resolved: router:list renders a bordered Symfony table with route/request/path headers. Also drop the '| grep pinboard' in favour of the app-ID argument that router:list accepts. Filtering the full route list strips the headers and makes the column widths depend on every other app's routes, so the output could never be quoted reliably. Signed-off-by: Anna Larch --- content/php/beginner/3.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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