修复BUG

This commit is contained in:
liu
2026-08-27 14:20:09 +08:00
parent 513cc568a9
commit 52dc6efadf
203 changed files with 576 additions and 1130 deletions
+2 -1
View File
@@ -31,6 +31,7 @@ class ProductModel extends Model
'name',
'spec',
'unit',
'price_unit',
'image_ids',
'content',
'sort',
@@ -67,7 +68,7 @@ class ProductModel extends Model
public function imageIds(): Attribute
{
return Attribute::make(
get: fn ($value) => explode(',', $value),
get: fn ($value) => $value ? explode(',', $value) : [],
set: fn ($value) => is_array($value) ? implode(',', $value) : $value,
);
}