diff --git a/laravel/routing/controller.php b/laravel/routing/controller.php index 99723842..357c2e96 100644 --- a/laravel/routing/controller.php +++ b/laravel/routing/controller.php @@ -113,6 +113,8 @@ protected static function references(&$destination, &$parameters) */ public static function resolve($bundle, $controller) { + if ( ! static::load($bundle, $controller)) return; + $identifier = Bundle::identifier($bundle, $controller); // If the controller is registered in the IoC container, we will resolve @@ -128,8 +130,6 @@ public static function resolve($bundle, $controller) // If we couldn't resolve the controller out of the IoC container we'll // format the controller name into its proper class name and load it // by convention out of the bundle's controller directory. - if ( ! static::load($bundle, $controller)) return; - $controller = static::format($bundle, $controller); $controller = new $controller;