Update CartItemModel.php

This commit is contained in:
Patrick
2022-02-09 00:18:22 +01:00
committed by GitHub
parent c68c5ad1bf
commit 56fb4250ea

View File

@@ -88,7 +88,7 @@ class CartItemModel extends Model
public function discount(): Attribute
{
return new Attribute(
get: fn ($value, $attributes): Money {
get: function ($value, $attributes): Money {
if (! $attributes['discount_fixed']) {
return $attribute['price_all']->subtract($attributes['discount_fixed'])
} else {