feat: update product resource and seeder to support variant groups and remove unused fields
This commit is contained in:
@@ -17,7 +17,6 @@ class ProductResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'tenant_codigo' => $this->tenant_codigo,
|
||||
'category_id' => $this->categoria_id,
|
||||
'brand_id' => $this->brand_id,
|
||||
'slug' => $this->slug,
|
||||
|
||||
@@ -273,6 +273,7 @@ class ProductService
|
||||
}
|
||||
|
||||
$product->setRelation('attachments', $resolvedAttachment ? collect([$resolvedAttachment]) : collect());
|
||||
$product->unsetRelation('variants');
|
||||
}
|
||||
|
||||
return $products;
|
||||
|
||||
Reference in New Issue
Block a user