Skip to content

docs(frontend-setup): document window.route() helper requirement#11

Open
mpge wants to merge 1 commit intomainfrom
docs/route-helper-dependency
Open

docs(frontend-setup): document window.route() helper requirement#11
mpge wants to merge 1 commit intomainfrom
docs/route-helper-dependency

Conversation

@mpge
Copy link
Copy Markdown
Member

@mpge mpge commented Apr 24, 2026

Summary

The shared Escalated frontend calls Ziggy's route(name, params) helper in 77 components. Laravel hosts get it for free via Ziggy; non-Laravel hosts must ship a compatible shim against their own named-route table. This was previously undocumented and caused cryptic ReferenceError: route is not defined crashes for anyone setting up on Rails / Django / NestJS / etc.

New "4. Provide a `window.route()` helper" section in frontend-setup explains:

  • Laravel path (install Ziggy, done)
  • Non-Laravel path (ship a compatible shim)
  • The new safety stub that EscalatedPlugin.install() installs on hosts that haven't provided one

Related

Test plan

  • Docs-only; no code changes

The shared Escalated frontend calls Ziggy's route(name, params) helper
in 77 components. Laravel hosts get it for free; non-Laravel hosts must
ship a compatible shim against their own named-route table, or install
Ziggy directly if it's compatible.

Also mention the safety stub EscalatedPlugin.install() now installs
when no window.route is present — it throws a descriptive error rather
than a bare ReferenceError, but is not a functional replacement.

See escalated-dev/escalated#36 for the plugin-side change.
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