@extends('front.layouts.app') @section('content') @php $user = $user ?? null; $userRole = $userRole ?? ($user ? $user->role_slug : 'athlete'); $profile = $profile ?? (($userRole === 'team') ? ($user->teamProfile ?? null) : ($user->athleteProfile ?? null)); $location = $location ?? ''; $sportName = $sportName ?? ''; $positionName = $positionName ?? ''; $avatarImage = $avatarImage ?? asset('front/assets/images/user.jpeg'); $coverImage = $coverImage ?? asset('front/assets/images/cover.jpg'); $campaigns = $campaigns ?? collect(); $profileStats = $profileStats ?? []; $supporters = $profileStats['supporters'] ?? 0; $followers = $profileStats['followers'] ?? 0; $totalRaised = $profileStats['total_raised'] ?? ($totalRaised ?? 0); $activeCampaigns = $profileStats['active_campaigns'] ?? ($activeCampaigns ?? 0); $nftsMinted = $profileStats['nfts_minted'] ?? 0; $nftTiers = $nftTiers ?? collect(); $otherUsers = $otherUsers ?? collect(); $followersFormatted = $followers >= 1000 ? number_format($followers / 1000, 1) . 'K' : (string) $followers; // Get bio $bio = optional($profile)->athlete_bio ?? optional($profile)->team_bio_tagline ?? 'No bio available'; // Get school/club name $schoolClub = optional($user)->school_club_name ?? optional($profile)->team_club_name ?? optional($profile)->school_club_name ?? 'N/A'; // Get social links $socialLinks = $user->socialLinks ?? collect(); // Get gender icon $genderIcon = ''; if ($userRole === 'athlete' && isset($user->gender)) { $genderIcon = $user->gender == 1 ? asset('front/assets/images/male.svg') : asset('front/assets/images/female.svg'); } $userTypeBadge = ($userRole === 'team') ? asset('front/assets/images/team.png') : asset('front/assets/images/athelete.png'); $authUserId = auth()->id(); $discoverConversationId = ($authUserId && $user) ? \App\Models\Users\Message::discoverConversationId($authUserId, $user->id) : 0; $loggedInUserRole = $loggedInUserRole ?? (auth()->check() && auth()->user() ? auth()->user()->role_slug : null); $hasPendingInvite = $hasPendingInvite ?? false; $hasAcceptedInvite = $hasAcceptedInvite ?? false; @endphp
{{ $sportName }}{{ $positionName ? ' - ' . $positionName : '' }}
@if($location){{ $location }}
@endif @if($userRole == 'athlete' && $schoolClub && $schoolClub !== 'N/A'){{ $schoolClub }}
@endif{{ $bio }}
Matches / Events
supporters
Followers
Total Raised
Active Campaigns
NFTs Minted
{!! \App\Helpers\Helper::price($nftTier->nft_price) !!}
{{ $sold }}/{{ $total }} Sold
{{ $offerTitle }}
{{ $sponsorName }} · {!! \App\Helpers\Helper::price($fundingAmount) !!}
No sponsorship or partnership agreements at this time. Check back later or reach out to become a sponsor.
No team roster at this time. Check back later or reach out to become a team member.
1,240 supporters have contributed so far.
Messages with {{ ($userRole === 'team') ? $schoolClub : ($user->full_name ?? 'User') }}