douyi3676 2017-12-05 02:42
浏览 9
已采纳

如何在Zend 3中路线到儿童路线?

I use Zend Framework Version 3. I would like to redirect the request to a new route, and in more precisely to a childroute?

If it was only a "parent" route I would to this

return $this->redirect()->toRoute('name-of-route', []);

however I have a childroute I would like to redirect to. How can this be done

  • 写回答

1条回答 默认 最新

  • drutcs7210 2017-12-05 05:45
    关注

    Assuming this works the same as in ZF2, you use a / to denote the heirarchy:

    return $this->redirect()->toRoute('name-of-route/name-of-child-route', []);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部