如何使用twig中的get参数渲染控制器?
{{ render(controller('AutoBundle:MyController:main', { 'id': id, 'active': true } )) }}
像这样调用控制器:https://example.com/users/323?active = true
php symfony twig
php ×1
symfony ×1
twig ×1