@extends('layouts.admin') @section('title', 'Prizes & odds') @section('admin-content') @php $scratchMode=in_array(\App\Services\GameSettings::active(),['lucky-scratch-card','lucky-capsule-machine'],true); $giftMode=\App\Services\GameSettings::active()!=='lucky-wheel'; @endphp
SHAPE THE POSSIBILITIES

Prizes & odds.

Give each prize its own chance to shine.

@if(!$scratchMode)Manage game prizes@endifAdd a prize +
@if(!$giftMode)

Wheel appearance ↗ · Adjust the rim colour and prize image size.

@endif
How chances work

@if($scratchMode)This game draws directly from all active, in-stock prizes on this page with positive weights. Chance = prize weight ÷ total eligible weight. No Game Prize Pool assignment is needed.@else Chance = prize weight ÷ total weight of active, in-stock prizes in the game prize pool. Sold-out, inactive, zero-weight, and unassigned prizes cannot win.@endif Each distinct prize counts once. Game position does not change its chance.

Edit several prizes, then Save all changes. This saves edited rows on the current page only. Prize images save separately; save or discard prize edits before changing images or deleting prizes. On smaller screens, scroll the table sideways.

No prizes changed
@foreach($prizes as $prize) @endforeach
ActivePrize name
Description
Chance weightPrize colourPrize imagePrize stockUpdate / Delete
active) aria-label="{{ $prize->name }} active"> @if(!$assigned->contains($prize->id))Not in the game prize pool · Add to prize pool@endif {{ $totalWeight && $prize->active && $prize->stock > 0 && $assigned->contains($prize->id) ? number_format($prize->weight / $totalWeight * 100, 2) : '0.00' }}% chance @if($scratchMode)@include('admin.partials.prize-image',['prize'=>$prize])@else @forelse($slots->where('prize_id', $prize->id) as $slot)@include('admin.partials.slot-image', ['slot' => $slot])@emptyAdd this prize to the prize pool to upload an image.@endforelse @endif digital_value) min="0" max="1000000" required aria-label="Stock for {{ $prize->name }}">@if(!$prize->digital_value)@endif{{ $prize->digital_value ? 'Calculated from PIN inventory':'Remaining units' }}
@csrf @method('PUT')
@csrf @method('DELETE')
@include('admin.partials.list-pagination',['paginator'=>$prizes,'itemsLabel'=>'prizes'])

Create a new prize

✦
@csrf

Recent stock top-ups

@forelse($stockUpdates as $topup)@empty@endforelse
PrizeAddedStock after top-upAdminDate
{{ $topup->prize_name }}+{{ $topup->amount }}{{ $topup->balance_after }}{{ $topup->admin_name }}{{ \Carbon\Carbon::parse($topup->created_at)->format('d M, H:i') }}
Stock top-ups will be recorded here.
@endsection @push('scripts') @endpush @push('scripts')@endpush