foreverglory/routing-bundle
Composer 安装命令:
composer require foreverglory/routing-bundle
包简介
Symfony RoutingBundle
README 文档
README
Use alias path to access the original Controller
使用别名路径访问原始Controller
###Usage
composer require foreverglory/routing-bundle
###AppKernel
class AppKernel extends Kernel { public function registerBundles() { $bundles[] = new Glory\Bundle\RoutingBundle\GloryRoutingBundle(); } }
###Configure
routing config routing.yml
homepage: path: /homepage defaults: { _controller: AppBundle:Default:index } newpage: path: /new defaults: { _alias: homepage }
###Code
//generate alias url $url = $container->get('router')->generate('homepage'); //$url: /new
{{path("homepage")}}
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-07