@php $alerts = \App\Models\Alert::get(); @endphp
@if($alerts)
@if($alerts->count() === 1)
@php
$alerts = $alerts->first();
$box = 'note-warning';
if($alerts->icon === 'fa-link' OR $alerts->icon === 'fa-user' OR $alerts->icon === 'fa-check')
$box = 'note-success';
if($alerts->icon === 'fa-lightbulb')
$box = 'note-warning';
if($alerts->icon === 'fa-exclamation-triangle')
$box = 'note-danger';
if($alerts->icon === 'fa-info')
$box = 'note-info';
if($alerts->type === 'renewal')
$box = 'note-warning';
@endphp
@if($alerts->type === 'renewal' && setting('subscription_renewal_alert_suppress'))
@else
@if($alerts->type === 'renewal')
Subscription Expired!
@else
News Alert!
@endif
{!!$alerts->text!!}
@endif
@else
@foreach($alerts as $alert)
@php
$box = 'note-warning';
if($alert->icon === 'fa-link' OR $alert->icon === 'fa-user' OR $alert->icon === 'fa-check')
$box = 'note-success';
if($alert->icon === 'fa-lightbulb')
$box = 'note-warning';
if($alert->icon === 'fa-exclamation-triangle')
$box = 'note-danger';
if($alert->icon === 'fa-info')
$box = 'note-info';
if($alert->type === 'renewal')
$box = 'note-warning';
@endphp
@if($alert->type === 'renewal' && setting('subscription_renewal_alert_suppress'))
@else
@if($alert->type === 'renewal')
Subscription Expired!
@else
News Alert!
@endif
{!!$alert->text!!}
@endif
@endforeach
@endif
@endif