From b6cbac56c802cab3402d54f10a6af34c3aac3110 Mon Sep 17 00:00:00 2001 From: Daniel Petrie Date: Wed, 9 May 2012 17:06:04 -0700 Subject: [PATCH 1/2] bundle property wasn't being used, so I made use of it as well as adding the controllers name and action being called. --- laravel/routing/controller.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/laravel/routing/controller.php b/laravel/routing/controller.php index f75ef4b8..fb03abd3 100644 --- a/laravel/routing/controller.php +++ b/laravel/routing/controller.php @@ -25,6 +25,20 @@ abstract class Controller { * @var string */ public $bundle; + + /** + * The controllers name + * + * @var string + */ + public $name; + + /** + * The controllers action + * + * @var string + */ + public $action; /** * Indicates if the controller uses RESTful routing. @@ -143,6 +157,10 @@ public static function call($destination, $parameters = array()) list($controller, $method) = explode('@', $destination); $controller = static::resolve($bundle, $controller); + + $controller->bundle = $bundle; + $controller->name = $controller_name; + $controller->action = $method; // If the controller could not be resolved, we're out of options and // will return the 404 error response. If we found the controller, From 8a8d3319812d4e3974efd43c90376bc0362e8d5e Mon Sep 17 00:00:00 2001 From: Daniel Petrie Date: Wed, 9 May 2012 17:14:01 -0700 Subject: [PATCH 2/2] Update laravel/routing/controller.php --- 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 fb03abd3..4e6b4b90 100644 --- a/laravel/routing/controller.php +++ b/laravel/routing/controller.php @@ -154,9 +154,9 @@ public static function call($destination, $parameters = array()) // improve speed since the bundle is not loaded on every request. Bundle::start($bundle); - list($controller, $method) = explode('@', $destination); + list($controller_name, $method) = explode('@', $destination); - $controller = static::resolve($bundle, $controller); + $controller = static::resolve($bundle, $controller_name); $controller->bundle = $bundle; $controller->name = $controller_name;