diff --git a/app/Models/Result.php b/app/Models/Result.php index f84a72839..6e2cfbbc3 100644 --- a/app/Models/Result.php +++ b/app/Models/Result.php @@ -95,7 +95,7 @@ public function prunable(): Builder protected function downloadBits(): Attribute { return Attribute::make( - get: fn (): ?string => ! blank($this->download) && is_numeric($this->download) + get: fn (): ?int => ! blank($this->download) && is_numeric($this->download) ? number_format(num: $this->download * 8, decimals: 0, thousands_separator: '') : null, ); @@ -207,7 +207,7 @@ protected function serverName(): Attribute protected function uploadBits(): Attribute { return Attribute::make( - get: fn (): ?string => ! blank($this->upload) && is_numeric($this->upload) + get: fn (): ?int => ! blank($this->upload) && is_numeric($this->upload) ? number_format(num: $this->upload * 8, decimals: 0, thousands_separator: '') : null, );