From f9856988bb74d69aa4c521745d293174d5609a65 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 26 Jan 2012 10:21:00 -0600 Subject: [PATCH] cleaning up router comments. --- laravel/routing/router.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/laravel/routing/router.php b/laravel/routing/router.php index 1dcb595d..14c8f052 100644 --- a/laravel/routing/router.php +++ b/laravel/routing/router.php @@ -256,11 +256,12 @@ protected static function controller($bundle, $method, $destination, $segments) */ protected static function controller_key($segments, $directory) { + $reverse = array_reverse($segments, true); + // To find the proper controller, we need to iterate backwards through // the URI segments and take the first file that matches. That file // should be the deepest possible controller matched by the URI. - $reverse = array_reverse($segments, true); - + // Once we find it, we'll return its index key. foreach ($reverse as $key => $value) { $controller = implode('/', array_slice($segments, 0, $key + 1)).EXT;