Skip to content

Commit 89d0dc6

Browse files
committed
Refactor getAttributeValueByAttributeId method to simplify selected fields
This commit updates the getAttributeValueByAttributeId method in the ListCategoryController to select only the 'id' and 'value' fields from the attribute values, removing the 'hex_color' field. This change streamlines the data retrieval process and improves performance by reducing the amount of data returned.
1 parent 6ab0545 commit 89d0dc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Controllers/ListCategoryController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getAttributeValueByAttributeId($attributeId){
137137
$values = DB::table('attribute_values')
138138
->where('attribute_value_group_id', $group->id)
139139
->where('attribute_id',$attributeId)
140-
->select('id as value_id', 'value', 'hex_color')
140+
->select('id', 'value')
141141
->get();
142142

143143
$result[] = [

0 commit comments

Comments
 (0)