Skip to content

docs(mobile): fix broken @navigate examples (double-quoted plain routes) - #535

Merged
shanerbaner82 merged 1 commit into
mainfrom
docs/fix-navigate-quoting
Sep 25, 2026
Merged

shanerbaner82 merged 1 commit into
mainfrom
docs/fix-navigate-quoting

Conversation

@shanerbaner82

Copy link
Copy Markdown
Contributor

The documented @navigate="/route" form fails to compile. The Blade precompiler (NativeTagPrecompiler) treats a double-quoted @navigate value as a PHP expression, so a plain route compiles to nav('navigate', null, /item/42) and PHP throws a parse error. Single-quoted routes are wrapped in quotes and work.

This updates the examples to working forms:

  • Plain routes use single quotes: @navigate='/item/42', @navigate.replace='/login', and so on.
  • Dynamic routes are built in PHP: @navigate="'/detail/' . $item->id" (a {{ }} echo inside @navigate is not interpolated).
  • A short note explains that double quotes hold a PHP expression.

Docs only. The precompiler is not changed. Every updated example was checked against the precompiler regex and run through PHP.

@shanerbaner82
shanerbaner82 merged commit 351bfd9 into main Sep 25, 2026
3 checks passed
@shanerbaner82
shanerbaner82 deleted the docs/fix-navigate-quoting branch September 25, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant