new deployer command

This commit is contained in:
Mark Gregory
2026-09-16 13:22:16 +01:00
parent fac5df8cc3
commit 3410ab85fe
15 changed files with 26429 additions and 441 deletions
@@ -52,18 +52,16 @@ class DocumentationAttachment extends Model
{
$bytes = (int) $this->size;
$label = number_format($bytes / 1048576, 1) . ' MB';
if ($bytes <= 0) {
return 'Unknown size';
$label = 'Unknown size';
} elseif ($bytes < 1024) {
$label = $bytes . ' B';
} elseif ($bytes < 1048576) {
$label = number_format($bytes / 1024, 1) . ' KB';
}
if ($bytes < 1024) {
return $bytes . ' B';
}
if ($bytes < 1048576) {
return number_format($bytes / 1024, 1) . ' KB';
}
return number_format($bytes / 1048576, 1) . ' MB';
return $label;
}
}