Commit fb8eb874 authored by Taylor Otwell's avatar Taylor Otwell

added comment regarding nested route directories.

parent 5b86ad60
......@@ -73,6 +73,9 @@ class Router {
{
$segments = explode('/', $uri);
// Route files can be nested deep within sub-directories. To find the
// appropriate file, we work our way backward through the URI looking
// for the deepest matching file.
foreach (array_reverse($segments, true) as $key => $value)
{
if (file_exists($path = APP_PATH.'routes/'.implode('/', array_slice($segments, 0, $key + 1)).EXT))
......
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