Add more than one parameter in Twig path

后端 未结 2 942
悲&欢浪女
悲&欢浪女 2021-01-30 11:53

How to add more than one parameter in Twig path?
Say you have this route :

article_show:
    pattern:  /article/{slug}
    defaults: { _controller: AcmeArtic         


        
2条回答
  •  爱一瞬间的悲伤
    2021-01-30 12:45

    You can pass as many arguments as you want, separating them by commas:

    {{ path('_files_manage', {project: project.id, user: user.id}) }}
    

提交回复
热议问题