2017 © Pedro Peláez
 

symfony-bundle routing-bundle

Symfony RoutingBundle

image

foreverglory/routing-bundle

Symfony RoutingBundle

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Routing Bundle

Use alias path to access the original Controller, (*1)

使用别名路径访问原始Controller, (*2)

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, (*3)

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")}}

The Versions

07/08 2016

dev-master

9999999-dev http://foreverglory.me

Symfony RoutingBundle

  Sources   Download

MIT

The Requires

 

bundle route symfony routing

07/08 2016

v1.0.0

1.0.0.0 http://foreverglory.me

Symfony RoutingBundle

  Sources   Download

MIT

The Requires

 

bundle route symfony routing