tighten / ziggy

Use your Laravel routes in JavaScript.
MIT License
3.86k stars 247 forks source link

Fix numeric route names #658

Closed bakerkretzmar closed 1 year ago

bakerkretzmar commented 1 year ago

The Collection ->merge() method calls array_merge() under the hood, which re-numbers numeric array keys starting at 0. This PR adds fallback routes back into the route list one by one manually, so that we never call ->merge() and all numeric keys are preserved.

Fixes #657.