Example #1
0
 /**
  * @param AttributeGroup $attributeGroup
  * @param array $data
  * @return AttributeOption|\Illuminate\Database\Eloquent\Model
  */
 protected function createAttributeOption(AttributeGroup $attributeGroup, $data = []) : AttributeOption
 {
     return $attributeGroup->attributeOptions()->save(factory(AttributeOption::class)->make($data));
 }
 public function deleting(AttributeGroup $attributeGroup)
 {
     $products = $attributeGroup->getRelatedProducts();
     app(VariantRefresher::class)->setProducts($products);
 }