diff --git a/laravel/autoloader.php b/laravel/autoloader.php index 2a6fea73..288e6687 100644 --- a/laravel/autoloader.php +++ b/laravel/autoloader.php @@ -69,20 +69,6 @@ protected static function find($class) return LIBRARY_PATH.str_replace('_', '/', $file).EXT; } - // Since not all controllers will be resolved by the controller resolver, - // we will do a quick check in the controller directory for the class. - // For instance, since base controllers would not be resolved by the - // controller class, we will need to resolve them here. - if (strpos($class, '_Controller') !== false) - { - $controller = str_replace(array('_Controller', '_'), array('', '/'), $class); - - if (file_exists($path = strtolower(CONTROLLER_PATH.$controller.EXT))) - { - return $path; - } - } - // Next we will search through the common Laravel paths for the class file. // The Laravel framework path, along with the libraries and models paths // will be searched according to the Laravel class naming standard. @@ -105,6 +91,20 @@ protected static function find($class) return $path; } + + // Since not all controllers will be resolved by the controller resolver, + // we will do a quick check in the controller directory for the class. + // For instance, since base controllers would not be resolved by the + // controller class, we will need to resolve them here. + if (strpos($class, '_Controller') !== false) + { + $controller = str_replace(array('_Controller', '_'), array('', '/'), $class); + + if (file_exists($path = strtolower(CONTROLLER_PATH.$controller.EXT))) + { + return $path; + } + } } } \ No newline at end of file