From 86edc9d16a93439fd7014f4ee4a9d9bac5fb86d0 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 9 Feb 2022 00:17:52 +0100 Subject: [PATCH] Update CartModel.php --- src/Models/CartModel.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Models/CartModel.php b/src/Models/CartModel.php index 46c31fe..010eb75 100644 --- a/src/Models/CartModel.php +++ b/src/Models/CartModel.php @@ -41,7 +41,7 @@ class CartModel extends Model public function price(): Attribute { return new Attribute( - get: fn (): Money { + get: function (): Money { $sum = new Money(0, 'USD'); foreach (this->items as $item) { @@ -61,7 +61,7 @@ class CartModel extends Model public function discount(): Attribute { return new Attribute( - get: fn (): Money { + get: function (): Money { $sum = new Money(0, 'USD'); foreach (this->items as $item) { @@ -80,7 +80,7 @@ class CartModel extends Model public function subtotal(): Attribute { return new Attribute( - get: fn (): Money { + get: function (): Money { $sum = new Money(0, 'USD'); foreach (this->items as $item) { @@ -98,7 +98,7 @@ class CartModel extends Model public function tax(): Attribute { return new Attribute( - get: fn (): Money { + get: function (): Money { $sum = new Money(0, 'USD'); foreach (this->items as $item) { @@ -116,7 +116,7 @@ class CartModel extends Model public function total(): Attribute { return new Attribute( - get: fn (): Money { + get: function (): Money { $sum = new Money(0, 'USD'); foreach (this->items as $item) { @@ -134,7 +134,7 @@ class CartModel extends Model public function weight(): Attribute { return new Attribute( - get: fn (): int { + get: function (): int { $sum = 0; foreach (this->items as $item) {