{{-- ===== FOOTER ===== --}} @php $c = $content ?? collect(); // An emptied field in the content editor counts as not set. $field = fn (string $key) => $c->has($key) && trim((string) $c->get($key)->content_value) !== '' ? trim((string) $c->get($key)->content_value) : null; $footerDesc = $field('description'); $footerEmail = $field('email'); $footerSupportEmail = $field('support_email'); $footerWebsite = $field('website'); // White-label fallbacks: the operator's own details, or nothing. $bName = $brandName ?? company_name(); $bUrl = $brandUrl ?? null; $bEmail = $footerEmail ?? ($brandEmail ?? null); $bSupportEmail = $footerSupportEmail; $bWebsite = $footerWebsite ?? ($bUrl ? preg_replace('#^https?://(www\.)?#', '', rtrim($bUrl, '/')) : null); $bCopyright = $brandCopyright ?? $bName; $bDesc = $footerDesc ?? ($bName . ' ' . __('sections.footer.description')); @endphp