@php use Carbon\Carbon; $news_class = (isset($attr['class']) && !empty($attr['class'])) ? ' '.$attr['class'] : ''; $news_enable = sys_settings('header_notice_show'); $news_valid = true; $news_title = sys_settings('header_notice_title'); $news_text = sys_settings('header_notice_text'); $news_link = sys_settings('header_notice_link'); if (!empty(sys_settings('header_notice_date'))) { $now = Carbon::now()->tz(time_zone()); $expiry = Carbon::parse(sys_settings('header_notice_date'), time_zone()); $news_valid = ($now->lte($expiry->endOfDay())) ? true : false; } @endphp @if($news_enable == 'yes' && $news_valid && ($news_title || $news_text))
{{ $news_title }} @if($news_text) {{ $news_text }} @endif
@if($news_link) @endif