@php
    $blogObj = new \app\models\Blog();
    $archives = $blogObj->archiveBlogs();
@endphp
<div class="p-30 bg-white dark:bg-card sm:mb-30 mb-20 widget widget_categories style-1">
    <div class="mb-20 widget-title">
        <h4 class="text-[26px] font-semibold text-secondary dark:text-white title">{{ $args['title'] ?? __('Archives') }}</h4>
    </div>
    <ul>
        @forelse($archives as $archive)
            <li class="text-xl/42 text-lightgreen dark:text-white/70 font-normal relative flex justify-between">
                <a href="{{DzHelper::laraBlogArchiveLink($archive->year,$archive->month)}}">{{ $archive->month_name  }} {{ $archive->year }}</a>
                @if (!empty($args['show_post_counts']))
                    ({{ $archive->data  }})
                @endif
            </li>
        @empty
        @endforelse
    </ul>

</div>