refactor: Remove extensive unused administrative UI, styling, and JavaScript assets, and introduce a new payment API controller.

This commit is contained in:
pbao9
2026-03-09 14:16:39 +07:00
parent 23a496f511
commit 7b3c955d38
456 changed files with 2212 additions and 74052 deletions
@@ -174,11 +174,22 @@ class ServiceController extends Controller
return response()->json([
'error' => false,
'message' => 'Lấy dữ liệu thành công',
'page_type' => 'service',
'page_type' => $this->resolvePageType($product->product_type),
'data' => new ServiceResource($product),
]);
}
private function resolvePageType(?string $productType): string
{
return match ($productType) {
'vps', 'cloud' => 'service_vps',
'hosting', 'email', 'ssl' => 'service_hosting',
'domain' => 'service_domain',
'blog' => 'blog',
default => 'service_vps',
};
}
/**
* Get addons for a specific product
* GET /v1/products/{productId}/addons