Commit f408fcc2 authored by Jason Lewis's avatar Jason Lewis

Allow bundles to respond to root requests.

Signed-off-by: 's avatarJason Lewis <jason.lewis1991@gmail.com>
parent 5c3ede74
...@@ -191,7 +191,7 @@ class Bundle { ...@@ -191,7 +191,7 @@ class Bundle {
foreach (static::$bundles as $key => $value) foreach (static::$bundles as $key => $value)
{ {
if (isset($value['handles']) and starts_with($uri, $value['handles'].'/')) if (isset($value['handles']) and starts_with($uri, $value['handles'].'/') or $value['handles'] == '/')
{ {
return $key; return $key;
} }
......
...@@ -206,7 +206,12 @@ class Router { ...@@ -206,7 +206,12 @@ class Router {
continue; continue;
} }
$uri = str_replace('(:bundle)', static::$bundle, $uri); $uri = ltrim(str_replace('(:bundle)', static::$bundle, $uri), '/');
if($uri == '')
{
$uri = '/';
}
// If the URI begins with a wildcard, we want to add this route to the // If the URI begins with a wildcard, we want to add this route to the
// array of "fallback" routes. Fallback routes are always processed // array of "fallback" routes. Fallback routes are always processed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment