Fix 500 on authenticated pages by correcting Afia route.
Deploy Ladill Servers / deploy (push) Successful in 22s

Point Afia chat at servers.afia.chat, add missing input-error component, and fix stale layout/order route names.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-06 19:39:27 +00:00
co-authored by Cursor
parent b6c8ac343f
commit 1217bdac41
4 changed files with 18 additions and 13 deletions
@@ -0,0 +1,9 @@
@props(['messages'])
@if ($messages)
<ul {{ $attributes->merge(['class' => 'text-sm text-red-600 space-y-1']) }}>
@foreach ((array) $messages as $message)
<li>{{ $message }}</li>
@endforeach
</ul>
@endif
@@ -22,7 +22,7 @@
])->all();
$statusColors['approved'] = 'bg-amber-50 text-amber-700 border-amber-200';
$backRoute = $order->product?->type === 'dedicated' ? route('hosting.dedicated') : route('hosting.vps');
$backRoute = $order->product?->type === 'dedicated' ? route('servers.dedicated') : route('servers.vps');
$backLabel = $order->product?->type === 'dedicated' ? 'Dedicated Servers' : 'VPS';
$serverOrder = (array) ($order->meta['server_order'] ?? []);
$selectionSummary = (array) ($serverOrder['selection_summary'] ?? []);
+3 -3
View File
@@ -36,9 +36,9 @@
@endphp
@include('partials.mobile-bottom-nav', [
'homeUrl' => route('servers.dashboard'),
'homeActive' => request()->routeIs('servers.dashboard') || request()->routeIs('hosting.index'),
'searchUrl' => route('servers.dashboard'),
'searchActive' => request()->routeIs('hosting.*'),
'homeActive' => request()->routeIs('servers.dashboard'),
'searchUrl' => route('servers.search'),
'searchActive' => request()->routeIs('servers.search'),
'notificationsUrl' => route('notifications.index'),
'notificationsActive' => request()->routeIs('notifications.*'),
'unreadUrl' => route('notifications.unread'),
+5 -9
View File
@@ -1,16 +1,12 @@
@php
$afiaProduct = $afiaProduct ?? (request()->routeIs('email.*') ? 'email' : 'hosting');
$afiaGreeting = $afiaProduct === 'email'
? "Hi, I'm Afia 👋 Ask me anything about email — setting up a domain, verifying DNS, creating mailboxes, IMAP/SMTP settings or billing…"
: "Hi, I'm Afia 👋 Ask me anything about hosting — choosing a plan, linking a domain, using the control panel, SSL, or renewals…";
$afiaSuggestions = $afiaProduct === 'email'
? ['How do I set up email for my domain?', 'What DNS records do I need to verify?', 'How do I create a mailbox?', 'What are my IMAP and SMTP settings?']
: ['How do I link a domain to my hosting?', 'How do I open the control panel?', 'How do I renew my hosting plan?', 'How do I install WordPress?'];
$afiaSubtitle = $afiaProduct === 'email' ? 'Email assistant' : 'Hosting assistant';
$afiaProduct = $afiaProduct ?? 'servers';
$afiaGreeting = "Hi, I'm Afia 👋 Ask me anything about servers — choosing VPS or dedicated, ordering, SSH access, server panel, or billing…";
$afiaSuggestions = ['What is the difference between VPS and dedicated?', 'How do I order a VPS?', 'How do I access my server panel?', 'How do I renew my server?'];
$afiaSubtitle = 'Servers assistant';
@endphp
{{-- Afia Ladill AI assistant slide-over. Opened via $dispatch('afia-open'). --}}
<div x-data="afia({
chatUrl: '{{ $afiaProduct === 'email' ? route('email.afia.chat') : route('hosting.afia.chat') }}',
chatUrl: '{{ route('servers.afia.chat') }}',
csrf: '{{ csrf_token() }}',
greeting: @js($afiaGreeting),
suggestions: @js($afiaSuggestions),