@php $banner = null; $banner_single = null; if (isset($componentable)) { if (array_has($componentable, 'banner')) { $banner = $componentable->banner; } else { $banner = false; } } elseif (isset($post)) { if (array_has($post, 'banner')) { $banner = $post->banner; } else { $banner = false; } } elseif (isset($taxonomy) || isset($tax)) { $taxonomy = $taxonomy ?? $tax; $banner = $taxonomy->banner; } if (!isset($banner->type) || ($banner->type) == 'default') { $banner = $site->banner ?? null; $banner_single = 1; } @endphp