@php use App\Models\PopularitySkill; $selectedSkillIds = $player->popularitySkills->pluck('id')->all(); $otherSkillId = PopularitySkill::OTHER; $otherSelected = in_array($otherSkillId, $selectedSkillIds, true); $otherText = optional($player->popularitySkills->firstWhere('id', $otherSkillId))->pivot->other_text ?? ''; $player_image = $player && $player->profile_image ? $player->profileImageUrl() : ($player->user?->profileImageUrl() ?? placeholder_image_url('player')); @endphp

Edit Player — {{ $player->fullName() }}

{{-- AVATAR (click to change, live preview) --}}
{{-- PERSONAL / ROLE --}}
@php $playerMobile = trim(($player->user?->country_code ? $player->user->country_code . ' ' : '') . ($player->user?->mobile ?? '')); @endphp
{{-- POPULARITY SKILLS (multi-select as chips) --}}
@foreach ($player->popularitySkills as $sk) {{ $sk->name }} @endforeach
{{-- Shown only when the "Other" skill is selected --}}
!$otherSelected])>
{{-- BASE PRICE --}}
Points Money
{{-- SOCIAL INFORMATION --}}
{{-- PERFORMANCES (repeatable) --}}

Performances

@foreach ($player->performances as $i => $perf)
@endforeach
{{-- ACHIEVEMENTS (repeatable) --}}

Achievements

@foreach ($player->achievements as $i => $ach)
@endforeach
{{-- Templates for JS-added rows (placeholder __IDX__ replaced client-side) --}}