Commit 775b97ee authored by Taylor Otwell's avatar Taylor Otwell

load controller file before checking in ioc container.

parent 3d1a4402
...@@ -113,6 +113,8 @@ abstract class Controller { ...@@ -113,6 +113,8 @@ abstract class Controller {
*/ */
public static function resolve($bundle, $controller) public static function resolve($bundle, $controller)
{ {
if ( ! static::load($bundle, $controller)) return;
$identifier = Bundle::identifier($bundle, $controller); $identifier = Bundle::identifier($bundle, $controller);
// If the controller is registered in the IoC container, we will resolve // If the controller is registered in the IoC container, we will resolve
...@@ -128,8 +130,6 @@ abstract class Controller { ...@@ -128,8 +130,6 @@ abstract class Controller {
// If we couldn't resolve the controller out of the IoC container we'll // 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 // format the controller name into its proper class name and load it
// by convention out of the bundle's controller directory. // by convention out of the bundle's controller directory.
if ( ! static::load($bundle, $controller)) return;
$controller = static::format($bundle, $controller); $controller = static::format($bundle, $controller);
$controller = new $controller; $controller = new $controller;
......
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