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