-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[12.x] Route aliases #51307
[12.x] Route aliases #51307
Conversation
Please describe the reasoning for this PR instead of just linking to a discussion. |
Feel free to mark this as ready once you added a thorough description. Thanks |
@crynobone @driesvints I'd added some description to the PR. Not sure of the process, I just followed the Contribution section in the documentation, so, I am not sure if we should continue in the discussion approach or in the PR. |
todo:
|
How will this work with route caching? |
@morloderex good point, will consider checking it, thank you. |
Thanks for your pull request to Laravel! Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include. If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions! If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response. |
Adding the ability to alias a named route by another name/alias.
Motivation
Considering the following scenario, we have a package that implements some UI features with a basic routes, and another package that implementing some functionalities that needed to be used within the first package, if the first package does not allow configuring it's used routes, there will be no direct way to integrate the two packages.
Although, the previous scenario is considered as an edge-case due to the bad design that had been followed in the first package, yet, aliasing routes remain a good features that may be added value if it had been implemented in Laravel.
Usage
reference discussion #51306