Skip to content

Commit

Permalink
Attempt a more backwards-compatible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
theutz committed Jun 7, 2022
1 parent a34340c commit 9cea7f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Commands/CacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ protected function findOrbitModels(): Collection
->map(function ($item) use ($laravel) {
// Convert file path to namespace
$path = $item->getRelativePathName();
$ns = $laravel->getNamespace();
$class = sprintf(
'\%s%s',
$laravel->getNamespace(),
str_ends_with($ns, "\\") ? $ns : $ns."\\",
strtr(substr($path, 0, strrpos($path, '.')), '/', '\\')
);

Expand Down

0 comments on commit 9cea7f8

Please sign in to comment.