Add page heroes to single, multi, and WordPress hosting pages.
Deploy Ladill Hosting / deploy (push) Successful in 30s
Deploy Ladill Hosting / deploy (push) Successful in 30s
Surface account counts, status breakdown, and available plans in heroes consistent with Ladill Servers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -107,6 +107,19 @@ class HostingProductController extends Controller
|
||||
$nativeForm = $this->nativeHostingProductForm($type);
|
||||
$userDomains = $this->getUserDomains($user);
|
||||
|
||||
$pendingStatuses = ['pending_payment', 'pending_approval', 'approved', 'provisioning'];
|
||||
$heroStats = [
|
||||
'accounts' => $hostingAccounts->count(),
|
||||
'active' => $hostingAccounts->where('status', 'active')->count()
|
||||
+ $orders->where('status', 'active')->count()
|
||||
+ $rcHostingOrders->where('status', 'active')->count()
|
||||
+ $rcServiceOrders->where('status', 'active')->count(),
|
||||
'pending' => $orders->whereIn('status', $pendingStatuses)->count()
|
||||
+ $rcHostingOrders->whereIn('status', $pendingStatuses)->count()
|
||||
+ $rcServiceOrders->whereIn('status', $pendingStatuses)->count(),
|
||||
'plans' => count($nativeForm['packages'] ?? []),
|
||||
];
|
||||
|
||||
return view('hosting.type', [
|
||||
'title' => $title,
|
||||
'type' => $type,
|
||||
@@ -117,6 +130,7 @@ class HostingProductController extends Controller
|
||||
'marketingCategory' => $marketingCategory,
|
||||
'nativeForm' => $nativeForm,
|
||||
'userDomains' => $userDomains,
|
||||
'heroStats' => $heroStats,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user