Reason:
Sometimes DB updates do not work because we are calling non-static methods statically.
Error Code
Product::update([ 'product_sku' => $product_sku,'product_name' => $product_name);
We are calling to update suddenly after the status product but must need to change it to something like
Product::where('id', $product_id)->update([ 'product_sku' => $product_sku
,'product_name' => $product_name);orProduct::find($id)
->update([ 'product_sku' => $product_sku,'product_name' => $product_name);
No comments:
Post a Comment