修复BUG
This commit is contained in:
@@ -75,6 +75,7 @@ class BillModel extends Model
|
||||
'paid_operator_id',
|
||||
'operator_id',
|
||||
'remark',
|
||||
'after_sale',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user