load controller file before checking in ioc container.
This commit is contained in:
parent
3d1a44028a
commit
775b97ee76
|
@ -113,6 +113,8 @@ protected static function references(&$destination, &$parameters)
|
||||||
*/
|
*/
|
||||||
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 @@ public static function resolve($bundle, $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;
|
||||||
|
|
Loading…
Reference in New Issue