Don't force modules to have route files.
This commit is contained in:
parent
87a022cf35
commit
6c9bb15a8d
|
@ -37,7 +37,9 @@ public function __construct($path)
|
||||||
*/
|
*/
|
||||||
public function load($uri)
|
public function load($uri)
|
||||||
{
|
{
|
||||||
return array_merge($this->load_nested_routes(explode('/', $uri)), require $this->path.'routes'.EXT);
|
$base = (file_exists($path = $this->path.'routes'.EXT)) ? require $path : array();
|
||||||
|
|
||||||
|
return array_merge($this->load_nested_routes(explode('/', $uri)), $base);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue