Closed
Description
I would like to see an alias feature in the Routing component.
Usage
If you have a project and you use the SonataAdminBundle, the dashboard is at /admin/dashboard
. I don't like that and want to use /admin
. If we have an alias feature, we can do something like this:
admin_dashboard:
path: /admin
alias: sonata_admin_dashboard
We can even bring it a step further and say that an alias will copy all route data in the new one and you can override very thing. That means we can do something like this:
route_1:
path: /post/{year}/{slug}
defaults: { _controller: ... }
requirements:
year: \d{4}
slug: \w+
route_2:
requirements:
year: \d{2, 4}
slug: [0-9a-zA-Z]+
What do you guys think of this new feature? If the reaction is positive, I will start looking at how to implement this in the Routing component.