Skip to content

Commit

Permalink
optimize list fies
Browse files Browse the repository at this point in the history
  • Loading branch information
wdda committed Mar 17, 2023
1 parent d695ebc commit 66f9a8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Models/Resources/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public static function getList(Collection $params): array
$result = [];

foreach ($files as $file) {
if ($params->get('name')) {
if (!str_contains(basename($file), $params->get('name'))) {
continue;
}
}

$result[] = [
'name' => basename($file),
'path' => $path,
Expand Down

0 comments on commit 66f9a8f

Please sign in to comment.