From a2985005ff832cc31848ec30ceb1cc235fc240fd Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sat, 6 Jun 2026 16:46:09 +0000 Subject: [PATCH] Replace monolith user.* routes with cross-app URLs. Hosting type pages and panel views referenced platform routes that do not exist in the extracted app; link to domains, account, and servers apps instead. Co-authored-by: Cursor --- app/Support/helpers.php | 21 +++++++++++++++++++ config/app.php | 1 + resources/views/hosting/account.blade.php | 8 +++---- resources/views/hosting/order.blade.php | 10 ++++----- .../views/hosting/panel/domains.blade.php | 4 ++-- .../partials/order-form-fields.blade.php | 2 +- .../partials/server-order-modal.blade.php | 2 +- .../views/hosting/server-order.blade.php | 2 +- resources/views/hosting/server-type.blade.php | 2 +- resources/views/hosting/show.blade.php | 6 +++--- resources/views/hosting/type.blade.php | 1 + 11 files changed, 41 insertions(+), 18 deletions(-) diff --git a/app/Support/helpers.php b/app/Support/helpers.php index f46a40e..75163b0 100644 --- a/app/Support/helpers.php +++ b/app/Support/helpers.php @@ -15,3 +15,24 @@ if (! function_exists('ladill_account')) { return $request->attributes->get('actingAccount') ?? $request->user(); } } + +if (! function_exists('ladill_domains_url')) { + function ladill_domains_url(string $path = ''): string + { + return 'https://'.config('app.domains_domain').($path !== '' ? '/'.ltrim($path, '/') : ''); + } +} + +if (! function_exists('ladill_account_url')) { + function ladill_account_url(string $path = ''): string + { + return 'https://'.config('app.account_domain').($path !== '' ? '/'.ltrim($path, '/') : ''); + } +} + +if (! function_exists('ladill_servers_url')) { + function ladill_servers_url(string $path = ''): string + { + return 'https://'.config('app.servers_domain').($path !== '' ? '/'.ltrim($path, '/') : ''); + } +} diff --git a/config/app.php b/config/app.php index 92b42fe..061bc42 100644 --- a/config/app.php +++ b/config/app.php @@ -130,5 +130,6 @@ return [ 'account_domain' => env('ACCOUNT_DOMAIN', 'account.'.(parse_url((string) env('PLATFORM_URL', 'https://ladill.com'), PHP_URL_HOST) ?: 'ladill.com')), 'hosting_domain' => env('HOSTING_DOMAIN', parse_url((string) env('APP_URL', 'https://hosting.ladill.com'), PHP_URL_HOST) ?: 'hosting.ladill.com'), 'servers_domain' => env('SERVERS_DOMAIN', 'servers.'.(parse_url((string) env('PLATFORM_URL', 'https://ladill.com'), PHP_URL_HOST) ?: 'ladill.com')), + 'domains_domain' => env('DOMAINS_DOMAIN', 'domains.'.(parse_url((string) env('PLATFORM_URL', 'https://ladill.com'), PHP_URL_HOST) ?: 'ladill.com')), ]; diff --git a/resources/views/hosting/account.blade.php b/resources/views/hosting/account.blade.php index d407fa0..f2a9431 100644 --- a/resources/views/hosting/account.blade.php +++ b/resources/views/hosting/account.blade.php @@ -84,7 +84,7 @@ }"> {{-- Breadcrumb --}} @@ -135,7 +135,7 @@

Setup Failed

-

There was a problem setting up your hosting account. Our team has been notified and will resolve this shortly. If you need immediate assistance, please open a support ticket.

+

There was a problem setting up your hosting account. Our team has been notified and will resolve this shortly. If you need immediate assistance, please open a support ticket.

@@ -509,12 +509,12 @@

Don't have a domain? - Purchase one first + Purchase one first

@else
No domains found in your account. - Register a domain + Register a domain
@endif diff --git a/resources/views/hosting/order.blade.php b/resources/views/hosting/order.blade.php index e40331d..28f0ef4 100644 --- a/resources/views/hosting/order.blade.php +++ b/resources/views/hosting/order.blade.php @@ -23,10 +23,10 @@ $statusColors['approved'] = 'bg-amber-50 text-amber-700 border-amber-200'; $backRoute = match ($order->product?->type) { - 'single_domain' => route('user.products.single-domain-hosting'), - 'multi_domain' => route('user.products.multi-domain-hosting'), - 'wordpress' => route('user.products.wordpress-hosting'), - default => route('user.products.single-domain-hosting'), + 'single_domain' => route('hosting.single-domain'), + 'multi_domain' => route('hosting.multi-domain'), + 'wordpress' => route('hosting.wordpress'), + default => route('hosting.single-domain'), }; @endphp @@ -166,7 +166,7 @@ Open Control Panel @endif - Get Support diff --git a/resources/views/hosting/panel/domains.blade.php b/resources/views/hosting/panel/domains.blade.php index 06055c1..151d2b5 100644 --- a/resources/views/hosting/panel/domains.blade.php +++ b/resources/views/hosting/panel/domains.blade.php @@ -63,12 +63,12 @@

Don't have a domain? - Purchase one first + Purchase one first

@else
No domains found in your account. - Register a domain + Register a domain
@endif diff --git a/resources/views/hosting/partials/order-form-fields.blade.php b/resources/views/hosting/partials/order-form-fields.blade.php index e8b9d38..31117bb 100644 --- a/resources/views/hosting/partials/order-form-fields.blade.php +++ b/resources/views/hosting/partials/order-form-fields.blade.php @@ -35,7 +35,7 @@ @if ($nativeForm['requires_domain']) @php - $newDomainUrl = route('user.domains.purchase'); + $newDomainUrl = ladill_domains_url('/find'); @endphp
diff --git a/resources/views/hosting/partials/server-order-modal.blade.php b/resources/views/hosting/partials/server-order-modal.blade.php index 130f732..1a39001 100644 --- a/resources/views/hosting/partials/server-order-modal.blade.php +++ b/resources/views/hosting/partials/server-order-modal.blade.php @@ -23,7 +23,7 @@ @click.stop>
diff --git a/resources/views/hosting/server-order.blade.php b/resources/views/hosting/server-order.blade.php index 4971c5b..097df5d 100644 --- a/resources/views/hosting/server-order.blade.php +++ b/resources/views/hosting/server-order.blade.php @@ -215,7 +215,7 @@ Open Server Manager @endif - Get Support diff --git a/resources/views/hosting/server-type.blade.php b/resources/views/hosting/server-type.blade.php index c036b75..be80399 100644 --- a/resources/views/hosting/server-type.blade.php +++ b/resources/views/hosting/server-type.blade.php @@ -183,7 +183,7 @@ {{ $order->ip_address ?? '-' }} - + Manage → diff --git a/resources/views/hosting/show.blade.php b/resources/views/hosting/show.blade.php index 7cc9aff..9b5444e 100644 --- a/resources/views/hosting/show.blade.php +++ b/resources/views/hosting/show.blade.php @@ -15,9 +15,9 @@ $renewalOptions = collect($renewalOptions ?? [])->values(); $initialRenewalMonths = (string) ($renewalOptions->first()['months'] ?? '12'); $backRoute = match ((string) $order->hosting_type) { - 'multi_domain' => route('user.products.multi-domain-hosting'), - 'wordpress' => route('user.products.wordpress-hosting'), - default => route('user.products.single-domain-hosting'), + 'multi_domain' => route('hosting.multi-domain'), + 'wordpress' => route('hosting.wordpress'), + default => route('hosting.single-domain'), }; @endphp diff --git a/resources/views/hosting/type.blade.php b/resources/views/hosting/type.blade.php index 600c10d..cfd1c1d 100644 --- a/resources/views/hosting/type.blade.php +++ b/resources/views/hosting/type.blade.php @@ -2,6 +2,7 @@ {{ $title }} @php + $errors = $errors ?? new \Illuminate\Support\ViewErrorBag; $orderFormErrorFields = ['domain_name', 'plan_id', 'months']; $hasOrderFormErrors = collect($orderFormErrorFields)->contains(fn ($field) => $errors->has($field)); $shouldOpenOrderModal = (bool) session('open_product_order_modal', false) || $hasOrderFormErrors;