loadDefinition(ProductAccessoryDefinition::class); } public function filterByProduct(Product $product): self { $this->andWhere(['product_accessory.id_product' => $product->id]); return $this; } public function filterByAccessory(Accessory $accessory): self { $this->andWhere(['product_accessory.id_accessory' => $accessory->id]); return $this; } }