@extends('layouts.admin')
@section('title', 'Players')
@section('admin-content')
@include('admin.partials.player-tabs', ['activeTab' => 'players'])
Player Credits Spins IP addresses Email access Purchase credits Actions @forelse($players as $player){{ $player->name }} {{ $player->email }} {{ $player->spin_credits }} {{ $player->signup_credits_received }} at registration {{ $player->spins_count }} {{ $player->last_ip ?: 'Not recorded yet' }}Registered: {{ $player->registration_ip ?: 'Not recorded yet' }} @if($player->last_ip && $activeIPs->contains($player->last_ip))Last IP is blocked @endifManage IP rules ↗ @php($emailBlock = $emailBlocks->get($player->email))@if($emailBlock?->active)@elseBlock email @endif
@php($blockIp = $player->last_ip ?: $player->registration_ip)
@if($blockIp && !$activeIPs->contains($blockIp))Block IP @elseif($blockIp)IP is blocked @elseBlock IP @endif
Issue purchase code Edit @empty{{ $search ? 'No players match your search.' : 'No players yet. Player registration is available on the frontend.' }} @endforelse
Recent credit grants Audit trail Player Credits Granted by Note Date @forelse($grants as $grant){{ $grant->player_name }} +{{ $grant->amount }} {{ $grant->admin_name }} {{ $grant->note ?: '—' }} {{ \Carbon\Carbon::parse($grant->created_at)->format('d M, H:i') }} @emptyNo historical manual credit grants. New credits are recorded under Purchase codes. @endforelse
@foreach($players as $player)
Edit player ✕
{{ $player->name }} · Player #{{ $player->id }}
{{ $player->spin_credits }} credits {{ $player->spins_count }} spins Joined {{ $player->created_at->format('d M Y') }}
Last IP: {{ $player->last_ip ?: 'Not recorded' }} Registration IP: {{ $player->registration_ip ?: 'Not recorded' }}
@if((int) old('editing_player') === $player->id && $errors->any())@foreach($errors->all() as $error)
{{ $error }}
@endforeach
@endif
@php($customerProfile = \Illuminate\Support\Facades\DB::table('customer_profiles')->where('user_id', $player->id)->first())
@php($customAnswers = \Illuminate\Support\Facades\DB::table('customer_form_answers')->where('user_id',$player->id)->orderByDesc('id')->get())
@if($customAnswers->isNotEmpty())Additional form answers @foreach($customAnswers as $answer){{ $answer->label }}: {{ $answer->value }} ({{ $answer->created_at }})
@endforeach @endif
@if($customerProfile)Mobile: {{ $customerProfile->mobile ?: 'Not provided' }} Cat: {{ $customerProfile->cat_name ?: 'Not provided' }} Email offers: {{ $customerProfile->marketing_email ? 'Opted in' : 'Not opted in' }} WhatsApp/SMS offers: {{ $customerProfile->marketing_mobile ? 'Opted in' : 'Not opted in' }} Cats: {{ $customerProfile->cat_count ?? 'Not provided' }} Source: {{ $customerProfile->source ?: 'Not provided' }} Interests: {{ implode(', ', json_decode($customerProfile->interests ?: '[]', true) ?: []) ?: 'Not provided' }}
@endif
@endforeach
Block player access ✕
Blocking this IP also blocks other players using the same IP address.
@endsection
@push('scripts')
@endpush