Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix numeric route names #658

Merged
merged 3 commits into from
Aug 4, 2023
Merged

Fix numeric route names #658

merged 3 commits into from
Aug 4, 2023

Conversation

bakerkretzmar
Copy link
Collaborator

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.

@bakerkretzmar bakerkretzmar self-assigned this Aug 4, 2023
@bakerkretzmar bakerkretzmar merged commit 967074f into main Aug 4, 2023
@bakerkretzmar bakerkretzmar deleted the route-name-numbers branch August 4, 2023 18:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with ziggy when route name starts with a number (eg. 404)
1 participant