Created
December 14, 2012 11:45
-
-
Save Meroje/4284869 to your computer and use it in GitHub Desktop.
Illuminate custom Router (from JasonLewis)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$app['router'] = $app->share(function($app) | |
{ | |
return new Feather\Routing\Router($app); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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