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
+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),