Skip to content

Commit aa34f79

Browse files
committed
fix(serviceprovider): fix class name replacement
- Use `replaceFirst` instead of `ltrim` to remove leading backslash
1 parent 5ce178d commit aa34f79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ExceptionNotifyServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ protected function toAlias(string $class): string
185185
return str($class)
186186
->replaceFirst(__NAMESPACE__, '')
187187
->start('\\'.class_basename(ExceptionNotify::class))
188-
->ltrim('\\')
188+
->replaceFirst('\\', '')
189189
->explode('\\')
190190
->map(static fn (string $name): string => Str::snake($name, '-'))
191191
->implode('.');

0 commit comments

Comments
 (0)