@props(['mentor']) @php $name = (string) ($mentor->name ?: 'Mentor'); $topic = (string) ($mentor->topic ?: 'Professional Mentor'); $imagePath = $mentor->profile_image; $imageUrl = is_string($imagePath) && trim($imagePath) !== '' ? \Illuminate\Support\Facades\Storage::disk('public')->url(ltrim($imagePath, '/')) : null; $initials = collect(explode(' ', $name))->filter()->take(2)->map(fn ($part) => \Illuminate\Support\Str::upper(\Illuminate\Support\Str::substr($part, 0, 1)))->implode(''); $routeKey = $mentor->public_route_key ?? ($mentor->slug ?: $mentor->id); @endphp
merge(['class' => 'group rounded-[1.75rem] border border-slate-200 bg-white p-6 shadow-sm transition duration-300 hover:-translate-y-1 hover:border-[#292b86]/30 hover:shadow-xl hover:shadow-[#292b86]/10']) }}>
@if($imageUrl)
{{ $name }}
@else
{{ $initials ?: 'M' }}
@endif

{{ $name }}

{{ $topic }}

View profile