m
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user