@php
$isHtml = request()->query('view') === 'html';
// Resolve the company object: use $company if set, else fall back to first of $companies collection
$footerCompany = $company ?? (isset($companies) && $companies->count() ? $companies->first() : null);
$companyEmail = $footerCompany->companie_email ?? 'info@azora-sys.com';
$companyWebsite = $footerCompany->website ?? 'https://www.azora-sys.com';
$companyWebsiteText = str_replace(['https://', 'http://'], '', $companyWebsite);
$companyAddress = collect([
$footerCompany->country->currentTranslation->name ?? ($footerCompany->country->name ?? null),
$footerCompany->city->currentTranslation->name ?? ($footerCompany->city->name ?? null),
$footerCompany->area->currentTranslation->name ?? ($footerCompany->area->name ?? null),
])->filter()->implode(' - ') ?: null;
@endphp
@if($isHtml)
@if($companyAddress)
|
📍
{{ $companyAddress }}
|
@endif
|
|
|
@else
@if($companyAddress)
|
📍
{{ $companyAddress }}
|
@endif
|
|
|
@endif