Fix 500 on authenticated pages by correcting Afia route.
Deploy Ladill Servers / deploy (push) Successful in 22s
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user