diff --git a/src/Illuminate/Routing/Router.php b/src/Illuminate/Routing/Router.php index 07053b09290b..252a479c59d0 100644 --- a/src/Illuminate/Routing/Router.php +++ b/src/Illuminate/Routing/Router.php @@ -952,10 +952,11 @@ public function getMiddlewareGroups() * @param array $middleware * @return $this */ - public function middlewareGroup($name, array $middlewares) + public function middlewareGroup($name, array $middleware) { - foreach ($middlewares as $middleware) - $this->pushMiddlewareToGroup($name, $middleware); + foreach ($middleware as $m) { + $this->pushMiddlewareToGroup($name, $m); + } return $this; }