@extends('admin.layouts.app') @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Manage Claims

{{-- --}} {{--
--}}
@foreach($tickets as $ticket) @php @$ticket_sequences = App\Models\TicketSequence::where('ticket_detail_id', $ticket->id)->get(); @$result_publish = App\Models\ResultPublish::where('game_id', $ticket->game_id)->first(); @$result_numbers = App\Models\ResultPublishDetail::where('result_publish_id', $result_publish->id)->get(); // Initialize the total count of matching numbers $totalMatchingNumbersCount = 0; foreach ($ticket_sequences as $sequence) { // Get the winning numbers for the current sequence $winningNumbers = explode(',', $sequence->winning_sequence); // Initialize the count of matching numbers for the current sequence $matchingNumbersCount = 0; // Check if any of the winning numbers match the numbers in the WinningNumber table foreach ($winningNumbers as $winningNumber) { $matchingNumber = App\Models\WinningNumber::where('number', $winningNumber)->first(); if ($matchingNumber) { // Increment the count of matching numbers for the current sequence $matchingNumbersCount++; } } // Add the count of matching numbers for the current sequence to the total count $totalMatchingNumbersCount += $matchingNumbersCount; // Display the count of matching numbers for the current sequence // echo "Count of matching numbers for this sequence: " . $matchingNumbersCount . "
"; } // Display the total count of matching numbers across all sequences // echo "Total count of matching numbers: " . $totalMatchingNumbersCount; $description = []; $amount = []; foreach($result_numbers as $number){ if($number->number_range == $totalMatchingNumbersCount) { $description[] = $number->description; $amount[] = $number->amount; } } @endphp @if (array_sum($amount) > 0) @endif @endforeach
SL NO Ticket No Result Win Amount Type Payment Mode Status
{{ $ticket->game_id }} {{ $loop->iteration }} {{ $ticket->ticket_code}} @if(count($description) > 0) @foreach ($description as $desc) {{ $desc }}
@endforeach @else LOSS @endif
@if(count($amount) > 0) @foreach ($amount as $amnt) $ {{ $amnt }}
@endforeach @else 0 @endif
@if ($ticket->type == 1) USER @elseif($ticket->type == 2) AGENT @else N/A @endif @if ($ticket->payment_mode == 1) Wallet @elseif($ticket->payment_mode == 2) CASH @else N/A @endif @if ($ticket->is_claimed == 1) PAID @elseif($ticket->is_claimed == 2) REQUEST @else N/A @endif @if (count($amount) > 0) View @endif
@push('scripts') @endpush @endsection