@php $iconSvg = function (string $name, string $class = 'h-4 w-4') { $paths = [ 'mail' => '', 'phone' => '', 'map' => '', ]; return '' . ($paths[$name] ?? $paths['map']) . ''; }; $setting = function (string $key, string $default): string { try { if (\Illuminate\Support\Facades\Schema::hasTable('site_settings')) { return \App\Models\SiteSetting::getValue($key, $default) ?: $default; } } catch (\Throwable $exception) { return $default; } return $default; }; $assetUrl = fn (string $path): string => str_starts_with($path, 'http') ? $path : asset(ltrim($path, '/')); $footerLogo = $assetUrl($setting('footer_logo_path', 'assets/zlhost/logo-wide.png')); $footerDescription = $setting('footer_description', 'استضافة بلا حدود وحلول رقمية متكاملة للمؤسسات والمتاجر والمشاريع.'); $contactEmail = $setting('contact_email', 'info@zlhost.com'); $contactPhone = $setting('contact_phone', '+966 50 000 0000'); $socialLinks = [ ['key' => 'social_x', 'label' => 'X', 'url' => $setting('social_x', 'https://x.com/zlhost')], ['key' => 'social_instagram', 'label' => 'IG', 'url' => $setting('social_instagram', 'https://instagram.com/zlhost')], ['key' => 'social_facebook', 'label' => 'FB', 'url' => $setting('social_facebook', 'https://facebook.com/zlhost')], ['key' => 'social_linkedin', 'label' => 'IN', 'url' => $setting('social_linkedin', 'https://linkedin.com/company/zlhost')], ]; @endphp