Kaynağa Gözat

edit catalog: dont show delete btn on products with relations

Alexander Musikhin 7 ay önce
ebeveyn
işleme
587efbabad
1 değiştirilmiş dosya ile 2 ekleme ve 3 silme
  1. 2 3
      app/Models/Product.php

+ 2 - 3
app/Models/Product.php

@@ -126,12 +126,11 @@ class Product extends Model
         if($this->maf_orders && ($this->maf_orders->count() > 0)) {
             return true;
         }
-
+        
         if($this->orders && ($this->orders->count() > 0)) {
             return true;
         }
-
-
+        
         return false;
     }