File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Fix incorrectly stripped base controller action from transaction name (#406 )
6+
57## 2.1.1
68
79- Fix for potential ` Undefined index: controllers_base_namespace. ` notice
Original file line number Diff line number Diff line change @@ -149,7 +149,14 @@ public static function extractNameForRoute(Route $route): ?string
149149
150150 if (empty ($ routeName ) && $ route ->getActionName ()) {
151151 // SomeController@someAction (controller action)
152- $ routeName = ltrim ($ route ->getActionName (), (self ::$ baseControllerNamespace ?? '' ) . '\\' );
152+ $ routeName = $ route ->getActionName ();
153+
154+ $ baseNamespace = self ::$ baseControllerNamespace ?? '' ;
155+
156+ // Strip away the base namespace from the action name
157+ if (!empty ($ baseNamespace )) {
158+ $ routeName = Str::after ($ routeName , $ baseNamespace . '\\' );
159+ }
153160 }
154161
155162 if (empty ($ routeName ) || $ routeName === 'Closure ' ) {
You can’t perform that action at this time.
0 commit comments