@@ -70,27 +70,22 @@ public function getWidgets()
7070 "request " => [
7171 "icon " => "tags " ,
7272 "widget " => "PhpDebugBar.Widgets.HtmlVariableListWidget " ,
73- "map " => "request " ,
73+ "map " => "request.data " ,
7474 "default " => "{} "
7575 ]
7676 ];
7777
7878 if (Config::get ('debugbar.options.request.label ' , true )) {
7979 $ widgets ['currentrequest ' ] = [
8080 "icon " => "share " ,
81- "tooltip " => [
82- 'status ' => $ this ->response ->getStatusCode ()
83- ],
84- "map " => "request.uri " ,
81+ "map " => "request.data.uri " ,
8582 "link " => "request " ,
8683 "default " => ""
8784 ];
88- if ($ this ->request instanceof Request) {
89- $ widgets ['currentrequest ' ]['tooltip ' ] += [
90- 'action_name ' => optional ($ this ->request ->route ())->getName (),
91- 'controller_action ' => optional ($ this ->request ->route ())->getActionName (),
92- ];
93- }
85+ $ widgets ['currentrequest:tooltip ' ] = [
86+ "map " => "request.tooltip " ,
87+ "default " => "{} "
88+ ];
9489 }
9590
9691 return $ widgets ;
@@ -130,7 +125,7 @@ public function collect()
130125 'status ' => $ statusCode . ' ' . (isset (Response::$ statusTexts [$ statusCode ]) ? Response::$ statusTexts [$ statusCode ] : '' ),
131126 'duration ' => $ startTime ? $ this ->formatDuration (microtime (true ) - $ startTime ) : null ,
132127 'peak_memory ' => $ this ->formatBytes (memory_get_peak_usage (true ), 1 ),
133- ];
128+ ];
134129
135130 if ($ request instanceof Request) {
136131
@@ -191,7 +186,19 @@ public function collect()
191186 $ htmlData ['telescope ' ] = '<a href=" ' . $ url . '" target="_blank">View in Telescope</a> ' ;
192187 }
193188
194- return $ htmlData + $ data ;
189+ $ tooltip = Arr::only ($ data , ['status ' , 'full_url ' ]);
190+
191+ if ($ this ->request instanceof Request) {
192+ $ tooltip += [
193+ 'action_name ' => optional ($ this ->request ->route ())->getName (),
194+ 'controller_action ' => optional ($ this ->request ->route ())->getActionName (),
195+ ];
196+ }
197+
198+ return [
199+ 'data ' => $ htmlData + $ data ,
200+ 'tooltip ' => array_filter ($ tooltip )
201+ ];
195202 }
196203
197204 protected function getRouteInformation ($ route )
@@ -288,10 +295,10 @@ private function getCookieHeader($name, $value, $expires, $path, $domain, $secur
288295 }
289296
290297 $ cookie .= '; expires= ' . substr (
291- \DateTime::createFromFormat ('U ' , $ expires , new \DateTimeZone ('UTC ' ))->format ('D, d-M-Y H:i:s T ' ),
292- 0 ,
293- -5
294- );
298+ \DateTime::createFromFormat ('U ' , $ expires , new \DateTimeZone ('UTC ' ))->format ('D, d-M-Y H:i:s T ' ),
299+ 0 ,
300+ -5
301+ );
295302 }
296303
297304 if ($ domain ) {
0 commit comments