@php use App\Models\SiteSetting; $enabled = SiteSetting::getValue('notice_enabled') === '1'; $imagePath = SiteSetting::getValue('notice_image_path'); $imageUrl = $imagePath ? asset('storage/'.$imagePath) : null; $hasContent = (bool) $imageUrl; @endphp @if ($enabled && $hasContent) @endif