mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 00:22:15 +00:00
set/update/delete billing alert
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
namespace App\Users\Actions;
|
||||
|
||||
use ByteUnits\Metric;
|
||||
@@ -10,11 +9,10 @@ class FormatUsageEstimatesAction
|
||||
public function __invoke(string $currency, Collection $usage)
|
||||
{
|
||||
return $usage->map(function ($estimate) use ($currency) {
|
||||
|
||||
// Format usage
|
||||
$usage = match ($estimate['feature']) {
|
||||
'bandwidth' => Metric::megabytes($estimate['usage'])->format(),
|
||||
'storage' => Metric::megabytes($estimate['usage'])->format(),
|
||||
'storage' => Metric::megabytes($estimate['usage'])->format(),
|
||||
};
|
||||
|
||||
// Normalize units
|
||||
@@ -28,4 +26,4 @@ class FormatUsageEstimatesAction
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user