feat: Implement order and invoice management, enhance addon features, and remove the 'Type' module.
This commit is contained in:
@@ -39,17 +39,11 @@ class ServiceListResource extends JsonResource
|
||||
return [$pricing->billing_cycle => $pricing->price_sale];
|
||||
}),
|
||||
'group' => $this->category->name,
|
||||
'os' => $this->osVersions->groupBy('os_group_id')->map(function ($versions) {
|
||||
$group = $versions->first()->osGroup;
|
||||
'os' => $this->osVersions->map(function ($os) {
|
||||
return [
|
||||
'name' => $group?->name,
|
||||
'thumbnail' => $group?->thumbnail,
|
||||
'versions' => $versions->map(fn($os) => [
|
||||
'version' => $os->version,
|
||||
'name' => $os->name,
|
||||
])->values(),
|
||||
'group' => $os->osGroup->name ?? null,
|
||||
];
|
||||
})->values(),
|
||||
})->unique('group')->values(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user