We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 557095c + a18c2f0 commit 66758ccCopy full SHA for 66758cc
src/Http/Controllers/Api.php
@@ -28,11 +28,13 @@ public function getRoutes()
28
$routeMiddleware = [$routeMiddleware];
29
}
30
31
+ $action = $route->action['uses'] ?? '';
32
+
33
return [
34
'uri' => $route->uri,
35
'as' => $routeName,
36
'methods' => $route->methods,
- 'action' => $route->action['uses'] instanceof \Closure ? 'Closure' : ($route->action['uses'] ?? ''),
37
+ 'action' => is_string($action) ? $action : 'Closure',
38
'middleware' => $routeMiddleware,
39
];
40
})->values()->all();
0 commit comments