@php $userInfo = $user?->userable ?? null; $translations = $translations ?? []; $designationTranslations = $designationTranslations ?? []; if (empty($translations) && $userInfo) { $translations = parse_translation($userInfo); } if($userInfo && empty($designationTranslations) && method_exists($userInfo, 'designation')) { $designationTranslations = parse_translation($userInfo->designation); } $name = $translations['name'] ?? $userInfo->name ?? ''; $firstName = $translations['first_name'] ?? $userInfo->first_name ?? ''; $lastName = $translations['last_name'] ?? $userInfo->last_name ?? ''; $name = isset($userInfo?->first_name, $userInfo?->last_name) ? "{$firstName} {$lastName}" : $name; // Define the base paths $imagePath = userImagePath($guard ?? null); $storagePath = 'lms/' . $imagePath; $defaultCoverImage = 'lms/frontend/assets/images/870x260.svg'; $defaultProfileImage = 'lms/assets/images/placeholder/profile.jpg'; // Determine the profile image $coverImg = $userInfo?->cover_photo && fileExists($storagePath, $userInfo->cover_photo) ? 'storage/' . $storagePath . '/' . $userInfo->cover_photo : $defaultCoverImage; $profileImg = $userInfo?->profile_img && fileExists($storagePath, $userInfo->profile_img) ? 'storage/' . $storagePath . '/' . $userInfo->profile_img : $defaultProfileImage; $designation = $userInfo?->designation ?? null; @endphp
cover-image

{{ $name }}

{{ $shortBio ?? '' }}

@if ($designation)

{{ $designationTranslations['title'] ?? $userInfo?->designation?->title ?? '' }}

@endif
{{ translate('About') }}
  • {{ translate('Lives in') }}:
    {{ $userInfo->location ?? '' }}
{{ translate('Basic Info') }}
  • {{ translate('Email') }}:
    {{ $user->email ?? '' }}
  • @if ($userInfo->phone)
  • {{ translate('Phone') }}:
    {{ $userInfo->phone ?? '' }}
  • @endif