From 775b97ee76c07175c44a50cf94abfc51762bc4a5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 12 Feb 2012 19:15:13 -0600 Subject: [PATCH] load controller file before checking in ioc container. --- laravel/routing/controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;