@php $siteName = setting('site_name', 'INFINITY API HUB'); $footerBrand = setting('footer_brand_text', '') ?: $siteName; $footerAbout = setting('footer_about', '') ?: setting('footer_text', 'Fast, reliable & developer-friendly APIs. Built for developers, trusted by thousands.'); $footerLogo = setting('footer_logo', ''); $headerLogo = setting('logo', ''); $footLogoPath = $footerLogo ? asset('uploads/'.$footerLogo) : ($headerLogo ? asset('uploads/'.$headerLogo) : '/assets/footer-logo.png'); $tg = setting('support_telegram', ''); $wa = setting('support_whatsapp', ''); $fb = setting('support_facebook', ''); $yt = setting('support_youtube', ''); $footerBg = setting('footer_bg', '#0b1526'); $footerCopyright = setting('footer_copyright', '') ?: '© '.date('Y').' '.$siteName.'. All rights reserved.'; $devName = setting('footer_developer_name', 'Infinity Codex'); $devLink = setting('footer_developer_link', 'https://t.me/INFINITY_codex'); if(!function_exists('parseFooterLinks')){ function parseFooterLinks($raw, $fallback = []) { $raw = trim((string)$raw); if($raw === '') return $fallback; $out = []; foreach(explode("\n", $raw) as $line){ $line = trim($line); if($line==='') continue; $parts = explode('|', $line, 2); $label = trim($parts[0] ?? ''); $url = trim($parts[1] ?? '#'); if($label==='') continue; $out[] = ['label'=>$label, 'url'=>$url]; } return $out ?: $fallback; }} $col1Title = setting('footer_col1_title', 'Quick Links'); $col1Raw = setting('footer_col1_links', ''); $col1Fallback = [ ['label'=>'Home','url'=>route('home')], ['label'=>'Pricing','url'=>route('home').'#pricing'], ['label'=>'API Documentation','url'=>route('docs')], ['label'=>'Check Key','url'=>route('check.key')], ['label'=>'System Status','url'=>route('status')], ]; $col1Links = parseFooterLinks($col1Raw, $col1Fallback); $col2Title = setting('footer_col2_title', 'APIs'); $col2Raw = setting('footer_col2_links', ''); try { $footServices = \App\Models\ApiService::active()->onHome()->orderBy('sort_order')->take(5)->get(); } catch (\Throwable $e) { $footServices = collect(); } $col2Custom = parseFooterLinks($col2Raw, []); $useCustomCol2 = !empty($col2Custom); $col3Title = setting('footer_col3_title', 'Support'); $col3Raw = setting('footer_col3_links', ''); $col3Fallback = [ ['label'=>'Integration Help','url'=>route('docs')], ['label'=>'FAQ','url'=>route('home').'#faq'], ['label'=>'Client Login','url'=>route('login')], ]; if($tg) $col3Fallback[] = ['label'=>'Telegram Support','url'=>$tg]; if($wa) $col3Fallback[] = ['label'=>'WhatsApp Support','url'=>$wa]; $col3Links = parseFooterLinks($col3Raw, $col3Fallback); @endphp @stack('scripts')