I am developing an application with symfony3.
I want to get the name of the route in the branch. I did this:
{% set current_path = path(app.request.get('_route')) %}
{{ current_path }}
displays the url of the current page. But I want to get the name of the route is not the way.
example :
personnel_index:
path: /liste
defaults: { _controller: "PersonnelBundle:Personnel:index" }
methods: GET
must return : personnel_index
so how can i get the route name
source
share