它应该在 Silex 中与 symfony/twig-bridge 一起工作吗?
{{ render(controller('MyController')) }}
现在我有这样的消息:
Twig_Error_Syntax: The function "controller" does not exist in "...
最佳答案
你可以这样使用它:
{{ render(path('your_route_id', {'id': id, 'anotherParam': param})) }}
关于php - 如何在 Silex 中使用 “render” 在 Twig 中插入 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21417672/