From 309d62fea4ea966c65d2dcbf5d1abdc758c6d14e Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 8 Feb 2022 23:05:38 +0100 Subject: [PATCH] Create CartModel.php --- src/Models/CartModel.php | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/Models/CartModel.php diff --git a/src/Models/CartModel.php b/src/Models/CartModel.php new file mode 100644 index 0000000..ce17e6e --- /dev/null +++ b/src/Models/CartModel.php @@ -0,0 +1,48 @@ + 'array', // Stored as JSON string, cast to array + ]; + + /** + * Get the CartItems for the cart. + */ + public function items() + { + return $this->hasMany(CartItem::class); + } +}