How to set array value in twig template

后端 未结 1 952
自闭症患者
自闭症患者 2021-01-20 01:17

How I can change my array value by string index in twig template? I\'m trying:

{% do params[\'redirect_uri\'] = \'http://site.loc/\' %}

but

相关标签:
1条回答
  • 2021-01-20 01:47

    what about,

    {% set params = params|merge({'redirect_uri': 'http://site.loc/'}) %}
    
    0 讨论(0)
提交回复
热议问题