Update BackupStats.php

This commit is contained in:
Bozhidar 2024-05-02 21:34:39 +03:00
parent aecf11c084
commit c0678b17fa

View file

@ -2,6 +2,7 @@
namespace app\Filament\Resources\BackupResource\Widgets; namespace app\Filament\Resources\BackupResource\Widgets;
use App\BackupStorage;
use App\Filament\Resources\BackupResource\Pages\ListBackups; use App\Filament\Resources\BackupResource\Pages\ListBackups;
use App\Filament\Resources\Shop\OrderResource\Pages\ListOrders; use App\Filament\Resources\Shop\OrderResource\Pages\ListOrders;
use App\Models\Backup; use App\Models\Backup;
@ -31,7 +32,7 @@ class BackupStats extends BaseWidget
} }
} }
$usedSpace = 0; $usedSpace = 0;
$backupPath = storage_path('backups'); $backupPath = BackupStorage::getPath();
if (is_dir($backupPath)) { if (is_dir($backupPath)) {
$usedSpace = $this->getDirectorySize($backupPath); $usedSpace = $this->getDirectorySize($backupPath);
} }