@php $name = trim(auth()->user()->name ?? ''); $initials = collect(explode(' ', $name)) ->filter() ->map(fn($part) => mb_strtoupper(mb_substr($part, 0, 1))) ->take(2) ->join(''); // deterministic color from name (md5 -> first 6 hex chars) $bgColor = $name ? '#'.substr(md5($name), 0, 6) : '#6b7280'; @endphp