File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,21 @@ public function getContext(): ?array
26
26
if (null === $ this ->currentRequest ) {
27
27
return null ;
28
28
}
29
+
29
30
$ controller = null ;
31
+
30
32
if ($ route = $ this ->currentRequest ->route ()) {
31
33
$ controller = $ route ->controller ;
34
+
35
+ if (! $ controller && ! is_string ($ route ->action ['uses ' ])) {
36
+ $ controller = $ route ->action ['uses ' ];
37
+ }
32
38
}
33
39
34
40
return array (
35
41
'uri ' => $ this ->currentRequest ->getUri (),
36
42
'method ' => $ this ->currentRequest ->getMethod (),
37
- 'controller ' => $ controller ? $ this ->cloner ->cloneVar (class_basename ($ this -> currentRequest -> route ()-> controller )) : $ controller ,
43
+ 'controller ' => $ controller ? $ this ->cloner ->cloneVar (class_basename ($ controller )) : $ controller ,
38
44
'identifier ' => spl_object_hash ($ this ->currentRequest ),
39
45
);
40
46
}
You can’t perform that action at this time.
0 commit comments