@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(); $totalRaised = $totalRaised ?? 0; $activeCampaigns = $activeCampaigns ?? 0; $nftTiers = $nftTiers ?? collect(); $otherUsers = $otherUsers ?? collect(); // 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'); @endphp
{{ $user->full_name ?? 'Athlete' }}
{{ ucfirst($userRole)}}

{{ ($userRole === 'team') ? $schoolClub : ($user->full_name ?? 'Athlete Name') }}

{{ $sportName }}{{ $positionName ? ' - ' . $positionName : '' }}

@if($location)

{{ $location }}

@endif @if($userRole == 'athlete' && $schoolClub && $schoolClub !== 'N/A')

{{ $schoolClub }}

@endif

About {{ ($userRole === 'team') ? $schoolClub : ($user->first_name ?? 'Athlete') }}

{{ $bio }}

@foreach($socialLinks as $socialLink) @php $socialIcon = ''; $socialUrl = $socialLink->social_link_url ?? '#'; switch($socialLink->social_link_type) { case 1: $socialIcon = asset('front/assets/images/youtube.png'); break; case 2: $socialIcon = asset('front/assets/images/instagram.png'); break; case 3: $socialIcon = asset('front/assets/images/facebook1.png'); break; case 4: $socialIcon = asset('front/assets/images/twitter1.png'); break; case 5: $socialIcon = asset('front/assets/images/link.png'); break; } @endphp @if($socialIcon) Social Link @endif @endforeach

Achievements

Active Fundraising Campaigns

38

Matches / Events

12

Wins / Medals

8.2K

Followers

{!! \App\Helpers\Helper::price($totalRaised) !!}

Total Raised

{{ $activeCampaigns }}

Active Campaigns

{{ $nftTiers->sum('nft_quantity') ?? 0 }}

NFTs Minted

@if($nftTiers->count() > 0)

Digital Collectibles

@foreach($nftTiers as $nftTier) @php $campaign = $nftTier->campaign ?? null; $campaignImage = asset('front/assets/images/placeholder-campaign.jpg'); if ($campaign && isset($campaign->campaign_image)) { $imgData = is_array($campaign->campaign_image) ? $campaign->campaign_image : []; $campaignImage = $imgData['original'] ?? $imgData['thumb'] ?? $campaignImage; } $nftTitle = 'NFT Tier'; if (isset($nftTier->rewards_perks_note)) { $lines = explode("\n", $nftTier->rewards_perks_note); if (isset($lines[0]) && strpos($lines[0], 'Title:') === 0) { $nftTitle = str_replace('Title: ', '', $lines[0]); } } $sold = 0; // TODO: Get actual sold count $total = $nftTier->nft_quantity ?? 100; @endphp
{{ $nftTitle }}

{{ $nftTitle }}

{!! \App\Helpers\Helper::price($nftTier->nft_price) !!}

{{ $sold }}/{{ $total }} Sold

Buy NFT
@endforeach
@endif @if($otherUsers->count() > 0)

Discover More Athletes / Teams

@foreach($otherUsers as $otherUser) @include('front.athletes.grid_list', ['user' => $otherUser]) @endforeach
@endif
@if($campaigns->count() > 0)

Active Fundraising Campaigns

@foreach($campaigns as $campaign) @php $campaignProgress = $campaign->fund_target > 0 ? ($campaign->fund_raised / $campaign->fund_target) * 100 : 0; $campaignProgress = min(100, max(0, $campaignProgress)); $sportIcon = asset('front/assets/images/ball.png'); if ($campaign->category && isset($campaign->category->image)) { $catImg = is_array($campaign->category->image) ? ($campaign->category->image['thumb'] ?? $campaign->category->image['original'] ?? '') : ''; if ($catImg) { $sportIcon = $catImg; } } @endphp
{{ $campaign->title }}
Click here to contribute
@endforeach
@endif

Sponsors & Partners

Product Sponsor

Primary branding across all athlete materials and events

Cash Sponsor

Logo placement on uniforms and training gear

Support {{ ($userRole == 'team') ? $schoolClub ?? 'Athlete' : ($user->first_name ?? 'Athlete') }}

1,240 supporters have contributed so far.

@endsection @push('page_script') @endpush