You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: system/Debug/Toolbar/Collectors/Routes.php
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,25 @@ public function display(): array
88
88
$route = $router->getMatchedRoute();
89
89
90
90
// Get our parameters
91
-
$method = is_callable($router->controllerName()) ? new \ReflectionFunction($router->controllerName()) : new \ReflectionMethod($router->controllerName(), $router->methodName());
91
+
// Closure routes
92
+
if (is_callable($router->controllerName()))
93
+
{
94
+
$method = new \ReflectionFunction($router->controllerName());
95
+
}
96
+
else
97
+
{
98
+
try
99
+
{
100
+
$method = new \ReflectionMethod($router->controllerName(), $router->methodName());
101
+
}
102
+
catch (\ReflectionException$e)
103
+
{
104
+
// If we're here, the method doesn't exist
105
+
// and is likely calculated in _remap.
106
+
$method = new \ReflectionMethod($router->controllerName(), '_remap');
0 commit comments