Don't force modules to have route files.

This commit is contained in:
Taylor Otwell 2011-08-04 10:48:25 -05:00
parent 87a022cf35
commit 6c9bb15a8d
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,9 @@ public function __construct($path)
*/
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);
}
/**