Commit b6feff37 authored by Taylor Otwell's avatar Taylor Otwell

added comment regarding nested route directories.

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