From 739975feae4d44de00ec49ffafd8841ac0e0300a Mon Sep 17 00:00:00 2001 From: Aman Date: Fri, 15 Sep 2023 17:15:56 +0000 Subject: [PATCH] server push fix related products --- packages/Sarga/Shop/src/Repositories/ProductRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Sarga/Shop/src/Repositories/ProductRepository.php b/packages/Sarga/Shop/src/Repositories/ProductRepository.php index f73990a..9c5ea4e 100644 --- a/packages/Sarga/Shop/src/Repositories/ProductRepository.php +++ b/packages/Sarga/Shop/src/Repositories/ProductRepository.php @@ -67,7 +67,7 @@ class ProductRepository extends WProductRepository $product = $this->find($product); if (count($product->categories)) { - $qb->where('product_categories.category_id', $product->categories->first->id); + $qb->where('product_categories.category_id', $product->categories->first()->id); } return $qb->paginate($limit); @@ -918,4 +918,4 @@ class ProductRepository extends WProductRepository ->get(); } -} \ No newline at end of file +}