Skip to content

Commit 1f7b884

Browse files
authored
DiscoverEvents::classFromFile (#52976)
1 parent 42ed5ba commit 1f7b884

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Foundation/Events/DiscoverEvents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ protected static function classFromFile(SplFileInfo $file, $basePath)
100100

101101
$class = trim(Str::replaceFirst($basePath, '', $file->getRealPath()), DIRECTORY_SEPARATOR);
102102

103-
return str_replace(
103+
return ucfirst(Str::camel(str_replace(
104104
[DIRECTORY_SEPARATOR, ucfirst(basename(app()->path())).'\\'],
105105
['\\', app()->getNamespace()],
106106
ucfirst(Str::replaceLast('.php', '', $class))
107-
);
107+
)));
108108
}
109109

110110
/**

0 commit comments

Comments
 (0)