We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cd1a6c commit d49e877Copy full SHA for d49e877
src/Routing/Route.php
@@ -199,8 +199,10 @@ protected function mergeControllerProperties()
199
} elseif (method_exists($controller, 'getMiddlewareForMethod')) {
200
$controllerMiddleware = $controller->getMiddlewareForMethod($this->controllerMethod);
201
}
202
-
203
- $this->middleware = array_merge($this->middleware, $controllerMiddleware);
+
+ if( count($controllerMiddleware) ) {
204
+ $this->middleware = array_merge($this->middleware, $controllerMiddleware);
205
+ }
206
207
if ($property = $this->findControllerPropertyOptions('throttles')) {
208
$this->throttle = $property['class'];
0 commit comments