@php
use App\Models\LeagueRegistration;
use App\Models\Player;
use App\Models\PopularitySkill;
$registration = $player->registration;
$status = $registration ? (int) $registration->registration_status : null;
$payment = $registration ? (int) $registration->payment_status : null;
$genderLabel = match ((int) $player->gender) {
Player::GENDER_MALE => 'Male',
Player::GENDER_FEMALE => 'Female',
Player::GENDER_OTHER => 'Other',
default => '—',
};
$paymentLabel = match ($payment) {
LeagueRegistration::PAYMENT_COMPLETED => 'Paid',
LeagueRegistration::PAYMENT_FAILED => 'Failed',
LeagueRegistration::PAYMENT_REFUNDED => 'Refunded',
LeagueRegistration::PAYMENT_PENDING => 'Pending',
default => '—',
};
$statusLabel = $status !== null ? LeagueRegistration::statusLabel($status) : '—';
@endphp
{{-- HEADER --}}
#PL-{{ str_pad($player->id, 4, '0', STR_PAD_LEFT) }}
{{ $player->fullName() }}
@if ($player->is_verified)
Verified
@else
Unverified
@endif
{{ optional($player->playerRole)->name ?? '—' }}
@if ($player->playerCategory) · {{ $player->playerCategory->name }} @endif
· Base Price: {{ $player->formattedBasePrice() }}
{{-- SOCIAL REACH --}}
Social Reach
Instagram Reach
{{ $player->instagram_reach ?: '—' }}
Facebook Reach
{{ $player->facebook_reach ?: '—' }}
TikTok Reach
{{ $player->tiktok_reach ?: '—' }}
{{-- PERSONAL + REGISTRATION --}}
Personal Information
| Full Name | {{ $player->fullName() }} |
| Gender | {{ $genderLabel }} |
| Batting Style | {{ optional($player->battingStyle)->display_name ?? optional($player->battingStyle)->name ?? '—' }} |
| Bowling Style | {{ optional($player->bowlingStyle)->display_name ?? optional($player->bowlingStyle)->name ?? '—' }} |
|
Registration
| Player ID | #PL-{{ str_pad($player->id, 4, '0', STR_PAD_LEFT) }} |
| League | {{ optional($player->league)->name ?? '—' }} |
| Category | {{ optional($player->playerCategory)->name ?? '—' }} |
| Base Price | {{ $player->formattedBasePrice() }} |
| Payment | {{ $paymentLabel }} |
| Status | {{ $statusLabel }} |
|
{{-- POPULARITY SKILLS --}}
Popularity Skills
@if ($player->popularitySkills->isNotEmpty())
@foreach ($player->popularitySkills as $skill)
{{ $skill->id === PopularitySkill::OTHER && filled($skill->pivot->other_text) ? $skill->pivot->other_text : $skill->name }}
@endforeach
@else
No popularity skills selected.
@endif
{{-- PERFORMANCES --}}
Performances
@forelse ($player->performances as $perf)
Performance @if ($perf->is_best) (Best) @endif
{{ (int) $perf->runs_scored }} runs · {{ (int) $perf->wickets_taken }} wkts · {{ (int) $perf->catches }} catches
@empty
No performances recorded yet.
@endforelse
{{-- ACHIEVEMENTS --}}
Achievements
@forelse ($player->achievements as $achievement)
{{ $achievement->achievement_title }}
{{ trim(($achievement->tournament_name ?? '') . ' ' . ($achievement->achievement_year ?? '')) ?: 'Achievement' }}
@empty
No achievements recorded yet.
@endforelse