Commit 6c9bb15a authored by Taylor Otwell's avatar Taylor Otwell

Don't force modules to have route files.

parent 87a022cf
......@@ -37,7 +37,9 @@ class Loader {
*/
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);
}
/**
......
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