Clean up route loader.
This commit is contained in:
parent
a6bb5f26a3
commit
05e365d0d5
|
@ -48,11 +48,9 @@ public function __construct($base, $nest)
|
||||||
*/
|
*/
|
||||||
public function load($uri)
|
public function load($uri)
|
||||||
{
|
{
|
||||||
$routes = (file_exists($path = $this->base.'routes'.EXT)) ? require $path : array();
|
|
||||||
|
|
||||||
$segments = Arr::without(explode('/', $uri), '');
|
$segments = Arr::without(explode('/', $uri), '');
|
||||||
|
|
||||||
return array_merge($this->nested($segments), $routes);
|
return array_merge($this->nested($segments), require $this->base.'routes'.EXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue