This commit is contained in:
snipe
2025-11-03 14:10:27 +00:00
parent 9ee36df979
commit 92b50ca7ae
+1 -1
View File
@@ -282,7 +282,7 @@ class Asset extends Depreciable
protected function warrantyExpires(): Attribute
{
return Attribute:: make(
get: fn(mixed $value, array $attributes) => ($attributes['warranty_months'] && $attributes['purchase_date']) ? Carbon::parse($attributes['purchase_date'])->addMonths($attributes['warranty_months']) : null,
get: fn(mixed $value, array $attributes) => ($attributes['warranty_months'] && $attributes['purchase_date']) ? Carbon::parse($attributes['purchase_date'])->addMonths((int)$attributes['warranty_months']) : null,
);
}