feat: update ProductController and ProductResource to include attribute options in product loading
This commit is contained in:
@@ -24,6 +24,7 @@ class ProductController extends Controller
|
||||
'attachments' => fn ($query) => $query->orderBy('attachments.id')->limit(1),
|
||||
'brand',
|
||||
'category',
|
||||
'attributes.options',
|
||||
])
|
||||
->latest()
|
||||
->paginateFromRequest()
|
||||
@@ -45,8 +46,7 @@ class ProductController extends Controller
|
||||
'attachments',
|
||||
'brand',
|
||||
'category',
|
||||
'variants.definitions.attribute.options',
|
||||
'variants.attachments',
|
||||
'attributes.options',
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user