diff --git a/packages/framework/src/Framework/Actions/Internal/FileFinder.php b/packages/framework/src/Framework/Actions/Internal/FileFinder.php index 014755b1c22..7ca447bde72 100644 --- a/packages/framework/src/Framework/Actions/Internal/FileFinder.php +++ b/packages/framework/src/Framework/Actions/Internal/FileFinder.php @@ -7,6 +7,7 @@ use Hyde\Facades\Filesystem; use Hyde\Hyde; use Illuminate\Support\Collection; +use SplFileInfo; use Symfony\Component\Finder\Finder; /** @@ -40,8 +41,8 @@ public static function handle(string $directory, string|array|false $matchExtens }, $matchExtensions)).')$/i'); } - return collect($finder)->map(function (string $file): string { - return Hyde::pathToRelative($file); + return collect($finder)->map(function (SplFileInfo $file): string { + return Hyde::pathToRelative($file->getPathname()); })->sort()->values(); } }