@php $initials = collect(preg_split('/\s+/', trim((string) $identity['title'])) ?: []) ->filter(static fn (string $chunk): bool => $chunk !== '') ->map(static fn (string $chunk): string => mb_substr($chunk, 0, 1)) ->take(2) ->implode(''); @endphp

Cardex Identity

{{ $initials !== '' ? $initials : '?' }}

{{ $identity['title'] }}

{{ $identity['subtitle'] }}

@if (! empty($identity['badges']))
@foreach ($identity['badges'] as $badge) {{ $badge }} @endforeach
@endif