From 77ed7637d3426c4ad3e24d03d5d717ee2aa0be9d Mon Sep 17 00:00:00 2001 From: Shane Rosenthal Date: Fri, 25 Sep 2026 06:12:04 -0400 Subject: [PATCH] docs(mobile): use working quoting for @navigate examples --- .../docs/mobile/4/edge-components/pressable.md | 2 +- .../views/docs/mobile/4/the-basics/routing.md | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/resources/views/docs/mobile/4/edge-components/pressable.md b/resources/views/docs/mobile/4/edge-components/pressable.md index 5183bf037..9cc26905d 100644 --- a/resources/views/docs/mobile/4/edge-components/pressable.md +++ b/resources/views/docs/mobile/4/edge-components/pressable.md @@ -95,7 +95,7 @@ a different component method. @verbatim ```blade @foreach ($items as $item) - + {{ $item->name }} @endforeach diff --git a/resources/views/docs/mobile/4/the-basics/routing.md b/resources/views/docs/mobile/4/the-basics/routing.md index 011c95c55..1310ff3de 100644 --- a/resources/views/docs/mobile/4/the-basics/routing.md +++ b/resources/views/docs/mobile/4/the-basics/routing.md @@ -103,11 +103,11 @@ Available cases: The `@navigate` directive triggers navigation directly from your view, with no component method required. It works on any node, so any element can become a navigation target. -The short form takes a route: +The short form takes a route in single quotes: @verbatim ```blade - + View item ``` @@ -125,13 +125,16 @@ To pass data along with the navigation, use the args form — a route followed b The next screen reads the data with `$this->data('source')`, exactly as with `$this->navigate()`. +Double quotes hold a PHP expression rather than a plain route, so `@navigate="/item/42"` won't compile. For a +dynamic route, build the string in PHP: `@navigate="'/item/' . $item->id"`. + ### Transition modifiers Add a transition as a modifier to override the default push animation: @verbatim ```blade - + Present modally ``` @@ -159,17 +162,17 @@ to `replace` or `exitToWeb`: Go back - + Sign out - + Open dashboard ``` @endverbatim -Transition and action modifiers can be combined — `@navigate.replace.fade="/login"`. +Transition and action modifiers can be combined — `@navigate.replace.fade='/login'`. ## Reading params and data