Skip to content

Instantly share code, notes, and snippets.

@Meroje
Created December 14, 2012 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Meroje/4284869 to your computer and use it in GitHub Desktop.
Save Meroje/4284869 to your computer and use it in GitHub Desktop.
Illuminate custom Router (from JasonLewis)
$app['router'] = $app->share(function($app)
{
return new Feather\Routing\Router($app);
});
<?php namespace Feather\Routing;
use Illuminate\Routing\Router as IlluminateRouter;
class Router extends IlluminateRouter {
/**
* Add a new route to the collection.
*
* @param string $pattern
* @param mixed $action
* @return Illuminate\Routing\Route
*/
public function get($pattern, $action)
{
dd('CUSTOM ROUTER!');
return $this->createRoute('get', $pattern, $action);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment