/home/techb158/immovalet.com/platform/plugins/ecommerce/src/Models
Edit: /home/techb158/immovalet.com/platform/plugins/ecommerce/src/Models/ProductAttributeSet.php (1333B)
BaseStatusEnum::class,
];
/**
* @return HasMany
*/
public function attributes()
{
return $this->hasMany(ProductAttribute::class, 'attribute_set_id')->orderBy('order', 'ASC');
}
protected static function boot()
{
parent::boot();
self::deleting(function (ProductAttributeSet $productAttributeSet) {
$attributes = ProductAttribute::where('attribute_set_id', $productAttributeSet->id)->get();
foreach ($attributes as $attribute) {
$attribute->delete();
}
});
}
}