Skip to content

Commit

Permalink
DiscoverEvents::classFromFile (#52976)
Browse files Browse the repository at this point in the history
  • Loading branch information
xizprodev authored Oct 1, 2024
1 parent 42ed5ba commit 1f7b884
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Events/DiscoverEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ protected static function classFromFile(SplFileInfo $file, $basePath)

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

return str_replace(
return ucfirst(Str::camel(str_replace(
[DIRECTORY_SEPARATOR, ucfirst(basename(app()->path())).'\\'],
['\\', app()->getNamespace()],
ucfirst(Str::replaceLast('.php', '', $class))
);
)));
}

/**
Expand Down

0 comments on commit 1f7b884

Please sign in to comment.