fix amount 8

This commit is contained in:
2026-06-09 16:44:02 +03:30
parent 918e8b4f76
commit 9f4f0c0145
7 changed files with 317 additions and 2 deletions
@@ -36,7 +36,7 @@ class ProductController extends SuperController
$query->where('owner', $user->id);
})->with(['wallet' => function ($query) use ($user) {
$query->where('owner', $user->id);
}])->get();
}, 'file'])->get();
// Prepare the response
$user['rows'] = $products->map(function ($product) {
@@ -46,6 +46,10 @@ class ProductController extends SuperController
'group_type' => $product->group_type ?? null,
]);
if ($product->relationLoaded('file') && $product->file) {
$product->file->setAttribute('full_src', $product->file->src);
}
return $product;
});