Replace monolith user.* routes with cross-app URLs.
Deploy Ladill Hosting / deploy (push) Successful in 20s

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 <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-06 16:46:09 +00:00
co-authored by Cursor
parent 136d741b8e
commit a2985005ff
11 changed files with 41 additions and 18 deletions
+21
View File
@@ -15,3 +15,24 @@ if (! function_exists('ladill_account')) {
return $request->attributes->get('actingAccount') ?? $request->user(); 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, '/') : '');
}
}
+1
View File
@@ -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')), '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'), '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')), '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')),
]; ];
+4 -4
View File
@@ -84,7 +84,7 @@
}"> }">
{{-- Breadcrumb --}} {{-- Breadcrumb --}}
<nav class="flex items-center gap-1.5 text-sm text-slate-500"> <nav class="flex items-center gap-1.5 text-sm text-slate-500">
<a href="{{ route('user.products.single-domain-hosting') }}" class="hover:text-slate-700 transition">Hosting</a> <a href="{{ route('hosting.single-domain') }}" class="hover:text-slate-700 transition">Hosting</a>
<svg class="h-3.5 w-3.5 text-slate-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5m0 0v-15"/></svg> <svg class="h-3.5 w-3.5 text-slate-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5m0 0v-15"/></svg>
<span class="font-medium text-slate-800">{{ $account->primary_domain ?: $account->username }}</span> <span class="font-medium text-slate-800">{{ $account->primary_domain ?: $account->username }}</span>
</nav> </nav>
@@ -135,7 +135,7 @@
<svg class="h-5 w-5 shrink-0 text-red-500 mt-0.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"/></svg> <svg class="h-5 w-5 shrink-0 text-red-500 mt-0.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"/></svg>
<div> <div>
<h3 class="text-sm font-semibold text-red-900">Setup Failed</h3> <h3 class="text-sm font-semibold text-red-900">Setup Failed</h3>
<p class="text-sm text-red-700 mt-0.5">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 <a href="{{ route('user.support-tickets.create') }}" class="underline font-medium hover:text-red-800">open a support ticket</a>.</p> <p class="text-sm text-red-700 mt-0.5">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 <a href="{{ ladill_account_url('/support-tickets/create') }}" class="underline font-medium hover:text-red-800">open a support ticket</a>.</p>
</div> </div>
</div> </div>
</div> </div>
@@ -509,12 +509,12 @@
</select> </select>
<p class="mt-1.5 text-xs text-slate-400"> <p class="mt-1.5 text-xs text-slate-400">
Don't have a domain? Don't have a domain?
<a href="{{ route('user.domains.purchase') }}" class="font-medium text-indigo-600 hover:text-indigo-800">Purchase one first</a> <a href="{{ ladill_domains_url('/find') }}" class="font-medium text-indigo-600 hover:text-indigo-800">Purchase one first</a>
</p> </p>
@else @else
<div class="rounded-lg bg-slate-50 px-4 py-3 text-center text-sm text-slate-600"> <div class="rounded-lg bg-slate-50 px-4 py-3 text-center text-sm text-slate-600">
No domains found in your account. No domains found in your account.
<a href="{{ route('user.domains.purchase') }}" class="font-medium text-indigo-600 underline underline-offset-2 hover:text-indigo-800">Register a domain</a> <a href="{{ ladill_domains_url('/find') }}" class="font-medium text-indigo-600 underline underline-offset-2 hover:text-indigo-800">Register a domain</a>
</div> </div>
@endif @endif
</div> </div>
+5 -5
View File
@@ -23,10 +23,10 @@
$statusColors['approved'] = 'bg-amber-50 text-amber-700 border-amber-200'; $statusColors['approved'] = 'bg-amber-50 text-amber-700 border-amber-200';
$backRoute = match ($order->product?->type) { $backRoute = match ($order->product?->type) {
'single_domain' => route('user.products.single-domain-hosting'), 'single_domain' => route('hosting.single-domain'),
'multi_domain' => route('user.products.multi-domain-hosting'), 'multi_domain' => route('hosting.multi-domain'),
'wordpress' => route('user.products.wordpress-hosting'), 'wordpress' => route('hosting.wordpress'),
default => route('user.products.single-domain-hosting'), default => route('hosting.single-domain'),
}; };
@endphp @endphp
@@ -166,7 +166,7 @@
Open Control Panel Open Control Panel
</a> </a>
@endif @endif
<a href="{{ route('user.support-tickets.create') }}" <a href="{{ ladill_account_url('/support-tickets/create') }}"
class="flex w-full items-center justify-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2.5 text-sm font-medium text-gray-700 transition hover:bg-gray-50"> class="flex w-full items-center justify-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2.5 text-sm font-medium text-gray-700 transition hover:bg-gray-50">
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"/></svg> <svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"/></svg>
Get Support Get Support
@@ -63,12 +63,12 @@
</select> </select>
<p class="mt-1.5 text-xs text-slate-500"> <p class="mt-1.5 text-xs text-slate-500">
Don't have a domain? Don't have a domain?
<a href="{{ route('user.domains.purchase') }}" class="font-medium text-indigo-600 hover:text-indigo-800">Purchase one first</a> <a href="{{ ladill_domains_url('/find') }}" class="font-medium text-indigo-600 hover:text-indigo-800">Purchase one first</a>
</p> </p>
@else @else
<div class="rounded-lg bg-slate-50 px-4 py-3 text-center text-sm text-slate-600"> <div class="rounded-lg bg-slate-50 px-4 py-3 text-center text-sm text-slate-600">
No domains found in your account. No domains found in your account.
<a href="{{ route('user.domains.purchase') }}" class="font-medium text-indigo-600 underline underline-offset-2 hover:text-indigo-800">Register a domain</a> <a href="{{ ladill_domains_url('/find') }}" class="font-medium text-indigo-600 underline underline-offset-2 hover:text-indigo-800">Register a domain</a>
</div> </div>
@endif @endif
</div> </div>
@@ -35,7 +35,7 @@
@if ($nativeForm['requires_domain']) @if ($nativeForm['requires_domain'])
@php @php
$newDomainUrl = route('user.domains.purchase'); $newDomainUrl = ladill_domains_url('/find');
@endphp @endphp
<div> <div>
<div class="mb-2 flex items-center justify-between"> <div class="mb-2 flex items-center justify-between">
@@ -23,7 +23,7 @@
@click.stop> @click.stop>
<form x-ref="form" <form x-ref="form"
method="POST" method="POST"
action="{{ route('user.hosting.servers.store') }}" action="{{ ladill_servers_url('/hosting/orders') }}"
x-data="serverOrderForm(@js($serverOrderPayloads), @js($billingCycles), @js($initialServerOrderState))" x-data="serverOrderForm(@js($serverOrderPayloads), @js($billingCycles), @js($initialServerOrderState))"
@submit.prevent="submitOrder" @submit.prevent="submitOrder"
class="max-h-[90vh] overflow-y-auto"> class="max-h-[90vh] overflow-y-auto">
@@ -215,7 +215,7 @@
Open Server Manager Open Server Manager
</a> </a>
@endif @endif
<a href="{{ route('user.support-tickets.create') }}" <a href="{{ ladill_account_url('/support-tickets/create') }}"
class="flex w-full items-center justify-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2.5 text-sm font-medium text-gray-700 transition hover:bg-gray-50"> class="flex w-full items-center justify-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2.5 text-sm font-medium text-gray-700 transition hover:bg-gray-50">
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"/></svg> <svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"/></svg>
Get Support Get Support
@@ -183,7 +183,7 @@
{{ $order->ip_address ?? '-' }} {{ $order->ip_address ?? '-' }}
</td> </td>
<td class="whitespace-nowrap px-5 py-4 text-right"> <td class="whitespace-nowrap px-5 py-4 text-right">
<a href="{{ route('user.products.orders.refresh', [$order->category, $order]) }}" class="text-sm font-medium text-gray-600 hover:text-gray-900"> <a href="{{ ladill_servers_url('/hosting') }}" class="text-sm font-medium text-gray-600 hover:text-gray-900">
Manage Manage
</a> </a>
</td> </td>
+3 -3
View File
@@ -15,9 +15,9 @@
$renewalOptions = collect($renewalOptions ?? [])->values(); $renewalOptions = collect($renewalOptions ?? [])->values();
$initialRenewalMonths = (string) ($renewalOptions->first()['months'] ?? '12'); $initialRenewalMonths = (string) ($renewalOptions->first()['months'] ?? '12');
$backRoute = match ((string) $order->hosting_type) { $backRoute = match ((string) $order->hosting_type) {
'multi_domain' => route('user.products.multi-domain-hosting'), 'multi_domain' => route('hosting.multi-domain'),
'wordpress' => route('user.products.wordpress-hosting'), 'wordpress' => route('hosting.wordpress'),
default => route('user.products.single-domain-hosting'), default => route('hosting.single-domain'),
}; };
@endphp @endphp
+1
View File
@@ -2,6 +2,7 @@
<x-slot name="title">{{ $title }}</x-slot> <x-slot name="title">{{ $title }}</x-slot>
@php @php
$errors = $errors ?? new \Illuminate\Support\ViewErrorBag;
$orderFormErrorFields = ['domain_name', 'plan_id', 'months']; $orderFormErrorFields = ['domain_name', 'plan_id', 'months'];
$hasOrderFormErrors = collect($orderFormErrorFields)->contains(fn ($field) => $errors->has($field)); $hasOrderFormErrors = collect($orderFormErrorFields)->contains(fn ($field) => $errors->has($field));
$shouldOpenOrderModal = (bool) session('open_product_order_modal', false) || $hasOrderFormErrors; $shouldOpenOrderModal = (bool) session('open_product_order_modal', false) || $hasOrderFormErrors;