This commit is contained in:
antv
2026-07-16 16:01:15 +07:00
parent 939287d9b3
commit 9c20a25111
10 changed files with 123 additions and 180 deletions
@@ -0,0 +1,14 @@
@props(['user'])
@php
$name = $user->name ?? '';
$initials = strtoupper(substr($name, 0, 2));
@endphp
@if(isset($user->avatar) && $user->avatar)
<img src="{{ $user->avatar }}" {{ $attributes->merge(['class' => 'w-12 h-12 rounded-full object-cover']) }} />
@else
<div {{ $attributes->merge(['class' => 'w-12 h-12 rounded-full bg-gray-200 flex items-center justify-center text-gray-600 font-bold']) }}>
{{ $initials }}
</div>
@endif