Skip to content

Commit 75d0c16

Browse files
committed
check for method
1 parent 08432ac commit 75d0c16

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/Foundation/Console/RouteListCommand.php

+4
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ protected function getControllerMiddleware($actionName)
173173
*/
174174
protected function getControllerMiddlewareFromInstance($controller, $method)
175175
{
176+
if (! method_exists($controller, 'getMiddleware')) {
177+
return [];
178+
}
179+
176180
$middleware = $this->router->getMiddleware();
177181

178182
$results = [];

0 commit comments

Comments
 (0)