File tree Expand file tree Collapse file tree
system/Debug/Toolbar/Collectors Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,17 +132,38 @@ public function display(): array
132132 ];
133133
134134 /*
135- * Defined Routes
136- */
137- $ rawRoutes = $ rawRoutes ->getRoutes ();
135+ * Defined Routes
136+ */
138137 $ routes = [];
138+ $ methods = [
139+ 'get ' ,
140+ 'head ' ,
141+ 'post ' ,
142+ 'patch ' ,
143+ 'put ' ,
144+ 'delete ' ,
145+ 'options ' ,
146+ 'trace ' ,
147+ 'connect ' ,
148+ 'cli ' ,
149+ ];
139150
140- foreach ($ rawRoutes as $ from => $ to )
151+ foreach ($ methods as $ method )
141152 {
142- $ routes [] = [
143- 'from ' => $ from ,
144- 'to ' => $ to ,
145- ];
153+ $ raw = $ rawRoutes ->getRoutes ($ method );
154+
155+ foreach ($ raw as $ route => $ handler )
156+ {
157+ // filter for strings, as callbacks aren't displayable
158+ if (is_string ($ handler ))
159+ {
160+ $ routes [] = [
161+ 'method ' => strtoupper ($ method ),
162+ 'route ' => $ route ,
163+ 'handler ' => $ handler ,
164+ ];
165+ }
166+ }
146167 }
147168
148169 return [
You can’t perform that action at this time.
0 commit comments