Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1672370

Browse files
committed
Fix bug with Route::controller and group namespaces.
1 parent 9e91bfd commit 1672370

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Illuminate/Routing/Router.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,17 @@ public function controllers(array $controllers)
249249
*/
250250
public function controller($uri, $controller, $names = array())
251251
{
252+
$prepended = $controller;
253+
252254
// First, we will check to see if a controller prefix has been registered in
253255
// the route group. If it has, we will need to prefix it before trying to
254256
// reflect into the class instance and pull out the method for routing.
255257
if (count($this->groupStack) > 0)
256258
{
257-
$controller = $this->prependGroupUses($controller);
259+
$prepended = $this->prependGroupUses($controller);
258260
}
259261

260-
$routable = $this->getInspector()->getRoutable($controller, $uri);
262+
$routable = $this->getInspector()->getRoutable($prepended, $uri);
261263

262264
// When a controller is routed using this method, we use Reflection to parse
263265
// out all of the routable methods for the controller, then register each

0 commit comments

Comments
 (0)