foreverglory / routing-bundle
Symfony RoutingBundle
Package info
github.com/foreverglory/routing-bundle
Type:symfony-bundle
pkg:composer/foreverglory/routing-bundle
v1.0.0
2016-08-07 12:00 UTC
Requires
- symfony/symfony: ~2.3|~3.0
This package is not auto-updated.
Last update: 2026-03-09 14:03:15 UTC
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")}}