Add page heroes to VPS and dedicated server pages.
Deploy Ladill Servers / deploy (push) Successful in 1m49s
Deploy Ladill Servers / deploy (push) Successful in 1m49s
Surface server counts, status breakdown, and available plans in heroes consistent with other Ladill apps. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -172,6 +172,14 @@ class HostingProductController extends Controller
|
||||
CustomerHostingOrder::CYCLE_YEARLY => 'Yearly (12 months)',
|
||||
];
|
||||
|
||||
$pendingStatuses = ['pending_payment', 'pending_approval', 'approved', 'provisioning'];
|
||||
$heroStats = [
|
||||
'total' => $orders->count() + $rcServiceOrders->count(),
|
||||
'active' => $orders->where('status', 'active')->count() + $rcServiceOrders->where('status', 'active')->count(),
|
||||
'pending' => $orders->whereIn('status', $pendingStatuses)->count() + $rcServiceOrders->whereIn('status', $pendingStatuses)->count(),
|
||||
'plans' => $products->count(),
|
||||
];
|
||||
|
||||
return view('hosting.server-type', [
|
||||
'title' => $title,
|
||||
'type' => $type,
|
||||
@@ -182,6 +190,7 @@ class HostingProductController extends Controller
|
||||
'serverOrderPayloads' => $serverOrderPayloads,
|
||||
'billingCycles' => $billingCycles,
|
||||
'userDomains' => $userDomains,
|
||||
'heroStats' => $heroStats,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user