@component('mail::message') {{ trans_choice('mail.license_expiring_alert', $licenses->count(), ['count'=>$licenses->count(), 'threshold' => $threshold]) }} @component('mail::table') @foreach ($licenses as $license) @php $expires = Helper::getFormattedDateObject($license->expiration_date, 'date'); $diff = round(abs(strtotime($license->expiration_date->format('Y-m-d')) - strtotime(date('Y-m-d')))/86400); $icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' '); @endphp @endforeach
 {{ trans('mail.name') }}{{ trans('mail.Days') }}{{ trans('mail.expires') }}
{{ $icon }} {{ $license->name }} {{ $diff }} {{ trans('mail.Days') }} {{ $expires['formatted'] }}
@endcomponent @endcomponent