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
2626 if (null === $ this ->currentRequest ) {
2727 return null ;
2828 }
29+
2930 $ controller = null ;
31+
3032 if ($ route = $ this ->currentRequest ->route ()) {
3133 $ controller = $ route ->controller ;
34+
35+ if (! $ controller && ! is_string ($ route ->action ['uses ' ])) {
36+ $ controller = $ route ->action ['uses ' ];
37+ }
3238 }
3339
3440 return array (
3541 'uri ' => $ this ->currentRequest ->getUri (),
3642 '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 ,
3844 'identifier ' => spl_object_hash ($ this ->currentRequest ),
3945 );
4046 }
You can’t perform that action at this time.
0 commit comments