Skip to content

Commit

Permalink
Fixes list command
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Aug 1, 2023
1 parent 177c2bc commit 1c14874
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Console/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,10 @@ protected function routesFromMountPaths(array $mountPaths): Collection
return collect($views)
->map(function (SplFileInfo $view) use ($domain, $mountPath) {
$viewPath = str_replace(DIRECTORY_SEPARATOR, '/', $view->getRealPath());

$uri = str_replace($mountPath, '', $viewPath);

if (count($this->laravel->make(FolioManager::class)->mountPaths()) === 1) {
$action = str_replace($mountPath.'/', '', $viewPath);

} else {
$basePath = str_replace(DIRECTORY_SEPARATOR, '/', base_path(DIRECTORY_SEPARATOR));

Expand Down Expand Up @@ -232,7 +230,7 @@ protected function sortRoutes($sort, array $routes): array
}

if ($second->startsWith($first)) {
return $first->explode('/')->count() >= $second->explode('/')->count() ? 1 : -1;
return $first->explode('/')->count() > $second->explode('/')->count() ? 1 : -1;
}

return $first->value() <=> $second->value();
Expand Down

0 comments on commit 1c14874

Please sign in to comment.