Add File model with getFileSizeInMB; pass sizeInStorage to show-documents

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 16:23:16 +05:00
parent fee24d1bce
commit 4d5098a921
3 changed files with 17 additions and 2 deletions

View File

@@ -212,7 +212,8 @@ class EstateController extends Controller
$countDocs = $allFiles->whereIn('type', ['passport_customer', 'certificate', 'appraiser_certificate', 'insurance_policy', 'participate_certificate'])->count();
$countMediaFiles = $allFiles->whereIn('type', ['object_photo', 'object_files', 'compares'])->count();
$otherFiles = $allFiles->where('type', 'additional')->count();
return view('estate.show-documents', compact('order', 'files', 'type', 'countDocs', 'countMediaFiles', 'otherFiles'));
$sizeInStorage = $allFiles->sum('size_in_bytes');
return view('estate.show-documents', compact('order', 'files', 'type', 'countDocs', 'countMediaFiles', 'otherFiles', 'sizeInStorage'));
}
public function orderClone($id)