Skip to content

Commit b1203a4

Browse files
authored
[9.x] Fallback to resolving controller middleware like before (#44590)
* Fallback to resolving controller middleware like before * Allow AsController actions to resolve controller middleware * Use method_exists instead of inheritance checks
1 parent 2e5cbd5 commit b1203a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Routing/Route.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ public function controllerMiddleware()
10931093
);
10941094
}
10951095

1096-
if (is_a($controllerClass, Controller::class, true)) {
1096+
if (method_exists($controllerClass, 'getMiddleware')) {
10971097
return $this->controllerDispatcher()->getMiddleware(
10981098
$this->getController(), $controllerMethod
10991099
);

0 commit comments

Comments
 (0)