@php $groups = $achievements->getCollection()->groupBy(fn ($a) => $a->achieved_at->format('Y')); @endphp
@if($achievements->total() > 0) {{ $achievements->total() }} {{ \Illuminate\Support\Str::plural('achievement', $achievements->total()) }} @endif
@if($achievements->isEmpty())
Achievements will appear here soon.
@else @foreach($groups as $year => $items)
{{ $year }}
@foreach($items as $achievement)
@endforeach
@endforeach
{{ $achievements->links() }}
@endif