-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Generate URLs from objects #11177
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
Comments
I would like it, too. It would be the inverse element to the |
👍 I've also missed this feature several times. And as pointed by @apfelbox, we already have the opposite feature (ParamConverter). |
For people wanting something like that today, @schmittjoh created an object-routing library a while back: http://jmsyst.com/libs/object-routing |
duplicate of #10395 |
@Tobion indeed it's a duplicated issue. So, maybe we should close this issue? |
Closing as duplicate |
It would be nice to allow the generation of routes from an object (just like the symfony1 times)
So instead of this:
{{ path('product_show', {'id': product.id, 'slug': product.slug}) }}
We can do this:
{{ path('product_show', product) }}
For more information check this stackoverflow question, and this gist
The text was updated successfully, but these errors were encountered: