@php $cardUser = !empty($post) ? $post->user : $topic->creator; $cardUserBadges = $cardUser->getBadges(); @endphp