From e8234d01feb3811fd72f0189b7118cd4444c6ebe Mon Sep 17 00:00:00 2001 From: A1Gard Date: Wed, 18 Oct 2023 00:33:26 +0330 Subject: [PATCH] fixed change price error (cherry picked from commit 1f43d04cb8ce609b9f07385fe7ea64d0d0124f22) --- app/Observers/ProductObserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Observers/ProductObserver.php b/app/Observers/ProductObserver.php index 70e8696..471e9c9 100755 --- a/app/Observers/ProductObserver.php +++ b/app/Observers/ProductObserver.php @@ -10,7 +10,7 @@ class ProductObserver // public function updated(Product $product){ \Log::info('product update'); - if ($product->wasChanged('price') && $p->price != null){ + if ($product->wasChanged('price')){ \Log::info('product price update'); $p = new Price(); $p->product_id = $product->id;