isValid()) { continue; } $path = $file->getRealPath(); if (! $path || ! is_file($path)) { continue; } $out[] = [ 'path' => $path, 'name' => $file->getClientOriginalName(), ]; } return $out; } }