fix bug in router::route method.
This commit is contained in:
parent
597feed4a7
commit
ae544b85da
|
@ -397,12 +397,14 @@ public static function route($method, $uri)
|
||||||
{
|
{
|
||||||
Bundle::start($bundle = Bundle::handles($uri));
|
Bundle::start($bundle = Bundle::handles($uri));
|
||||||
|
|
||||||
|
$routes = (array) static::routes($method);
|
||||||
|
|
||||||
// Of course literal route matches are the quickest to find, so we will
|
// Of course literal route matches are the quickest to find, so we will
|
||||||
// check for those first. If the destination key exists in teh routes
|
// check for those first. If the destination key exists in the routes
|
||||||
// array we can just return that route now.
|
// array we can just return that route now.
|
||||||
if (array_key_exists($uri, static::$routes[$method]))
|
if (array_key_exists($uri, $routes))
|
||||||
{
|
{
|
||||||
$action = static::$routes[$method][$uri];
|
$action = $routes[$uri];
|
||||||
|
|
||||||
return new Route($method, $uri, $action);
|
return new Route($method, $uri, $action);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue