View your Symfony2 routes in the browser
PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Controller
DependencyInjection
Resources
LICENSE
README.md
RouterDebugWebBundle.php

README.md

README

For the lazy. Instead of running "php app/console router:debug", just view the routes in the browser.

Installation

Install source code

You have two options to install the source code.

  • deps file
  • git submodules

Install via deps

Add into your deps file

[AizattoRouterDebugWebBundle]
     git=http://github.com/aizatto/AizattoRouterDebugWebBundle.git
     target=/bundles/Aizatto/Bundle/RouterDebugWebBundle

Execute vendor update script:

php bin/vendors update

Install via git submodules

Execute git submodule add command:

git submodule add \
  http://github.com/aizatto/AizattoRouterDebugWebBundle.git \
  vendor/bundles/Aizatto/Bundle/RouterDebugWebBundle

Install into AppKernel

Edit your AppKernel (app/AppKernel.php), add the following line in the 'dev', and 'test' environment only Bundles.

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
  ...
  $bundles[] = new Aizatto\Bundle\RouterDebugWebBundle\RouterDebugWebBundle();
  ...
}

Install into autoload

Edit app/autoload.php, and add the register the namespace "Aizatto":

$loader->registerNamespaces(array(
  'Aizatto' => __DIR__.'/../vendor/bundles',
))

Install routes

Add the necessary route.

In app/config/routing.yml:

AizattoRouterDebugWebBundle:
    resource: "@RouterDebugWebBundle/Controller/"
    type:     annotation
    prefix:   /_router/debug

Then visit in your brower http://localhost/_router/debug