@php $user = Auth::user(); $profile = $user->profile ?? null; $avatarUrl = $profile && $profile->avatar_url ? $profile->avatar_url : null; $initial = strtoupper(substr($user->username ?? 'A', 0, 1)); @endphp