@extends('admin.layouts.app') @section('content')

CLAIM TICKET WIN AMOUNT

@php $matchedAmounts = []; @endphp
@php $positionsWithStatusOne = []; // Initialize an array to store positions with at least one ticket having status 1 @endphp @for ($i = 0; $i < count($ticket_sequence); $i += 6) @php $countStatusOne = 0; // Initialize the count variable @endphp @for ($j = $i; $j < min($i + 6, count($ticket_sequence)); $j++) @if($ticket_sequence[$j]->status == 1) {{-- Add any logic or display for status 1 records here --}} @php $countStatusOne++; // Increment the count for each status 1 record @endphp @endif @endfor @if ($countStatusOne > 0) {{-- Save the position index in the array if at least one ticket has status 1 --}} @php $positionsWithStatusOne[] = $i; @endphp @endif @endfor @foreach ($positionsWithStatusOne as $position)
TICKET NO :
    @for ($j = $position; $j < min($position + 6, count($ticket_sequence)); $j++)
  • @endfor
@php $countStatusOne = 0; // Reset the count variable for each position @endphp {{-- Display additional information for this position, if applicable --}} @for ($j = $position; $j < min($position + 6, count($ticket_sequence)); $j++) @if ($ticket_sequence[$j]->status == 1) {{-- Add any logic or display for status 1 records here --}} @php $countStatusOne++; // Increment the count for each status 1 record @endphp @endif @endfor @if ($countStatusOne > 0) @foreach ($result_check as $result) @if ($result->number_range == $countStatusOne)

{{ $result->description }}

@php $matchedAmounts[] = $result->amount; @endphp {{-- Add any logic or display for the matching result_check here --}} @endif @endforeach @else

Sorry No number matched. You Lost !

@endif @endforeach
@php $totalAmount = array_sum($matchedAmounts); @endphp
{{ csrf_field() }}
@endsection @push('scripts') @endpush