Parcourir la source

edit catalog: dont show delete btn on products with relations

Alexander Musikhin il y a 7 mois
Parent
commit
587efbabad
1 fichiers modifiés avec 2 ajouts et 3 suppressions
  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;
     }