@php $userWithPhoto = true; $userNameForThubnail = null; $user = $data['user']; if(empty($user->foto)){ $userWithPhoto = false; $userNameForThubnail = substr($user->name, 0, 1); } $thumbnail = custom_system('API_URL') . '/' . $user->foto; @endphp @if($userWithPhoto) @endif @if(!$userWithPhoto)
{{ $userNameForThubnail }}
@endif