 
 <?php $__env->startSection('content'); ?>
<div class="card">
      <div class="card-body">
        
        <h1>Winning History</h1>
        
        </div>
    
        
        <div class="card-body">
            
            <form action="" method="GET">

            <div class="row">

                <!-- Date -->
                <div class="col-md-4 mb-3">
                    <label><strong>Date</strong></label>
                    <input type="date" 
                           name="date" 
                           class="form-control"
                           value="<?php echo e(request('date') ?? date('Y-m-d')); ?>">
                </div>

                <!-- Game -->
                <div class="col-md-4 mb-3">
                    <label><strong>Game</strong></label>
                    <select name="stores_id" class="form-control select2">
                        <option value="">Select an option</option>

                        <?php $__currentLoopData = storeList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $game): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($game->id); ?>">
                                <?php echo e($game->name); ?>

                            </option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>

                <!-- Game -->
                <div class="col-md-4 mb-3">
                    <label><strong>User</strong>(optional)</label>
                    <select name="user_id" class="form-control select2">
                        <option value="">Select User</option>

                        <?php $__currentLoopData = userList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $game): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($game->id); ?>">
                                <?php echo e($game->name); ?> (<?php echo e($game->mobile_number); ?>)
                            </option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>
                <!-- Game -->
                <div class="col-md-4 mb-3">
                    <label><strong>Bit Type</strong></label>
                    <select name="game_id" class="form-control select2">
                        <option value="">Select Bit Type</option>

                        <?php $__currentLoopData = [
                'singledigit',
                'pannafamily',
                'singlepanna',
                'doublepanna',
                'triplepanna',
                'singlepatti',
                'doublepatti',
                'triplepatti',
                'fullsangam',
                'halfsangam',
                'cyclepatti',
                'jodi',
                'jodifamily',
                'redjodi',
                'redjodifamily',
                'spmotor',
                'dpmotor'
            ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $game): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($game); ?>" <?php echo e(request('game_id') == $game ? 'selected' :''); ?>>
                                <?php echo e($game); ?>

                            </option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>


                <!-- Digit -->
                <div class="col-md-4 mb-3">
                    <label><strong>Min Amount</strong></label>
                    <input type="number" 
                           name="min_amount" 
                           class="form-control"
                           placeholder="Enter Min Amount"
                           id="min_amount"
                           value="<?php echo e(request('min_amount')); ?>"
                           >
                </div>

                <!-- Save Button -->
                <div class="col-md-12 mt-2">
                    <button type="submit" class="btn btn-primary px-4">
                        Apply Filters
                    </button>
                    <a href="<?php echo e(url('admin/userpalyed')); ?>">
                    <button type="button" class="btn btn-primary px-4">
                        Reset Filters
                    </button>
                    </a>
                </div>

            </div>
        </form>
            
            <?php if(session()->has('message')): ?>
                <div class="alert alert-success">
                    <?php echo e(session()->get('message')); ?>

                </div>
            <?php endif; ?>
            <div id="example1_wrapper" class=" dt-bootstrap4">
                <div class="row">
                    <div class="col-sm-12">
                         <div class='tablescroll'>
                            <div class="table-responsive">
                        <table class="table table-bordered text-center">
                <thead>
                    <tr role="row">
                                <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-sort="ascending"
                                    aria-label="Rendering engine: activate to sort column descending"
                                    style="width: 60px;">#
                                </th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                    Mobile Number
                                </th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                    User Name
                                </th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                    Market
                                </th>
                                
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                  Game Name
                                </th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                 Session
                                </th>
                                 <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                 Digits
                                </th>
                                 <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                Bid Amount
                                </th>
                                 <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                Win Amount
                                </th>
                                 <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                 Game Status
                                </th>
                                 <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                 Placed On
                                </th>
                                
                                
                              
                               
                                
                            </tr>
                </thead>
                <tbody>
                             
                  <?php $__empty_1 = true; $__currentLoopData = $lists; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                
                        <tr>
                          <td><?php echo e($key+1); ?></td>
                          <td>
                            <a><?php echo e(isset($list->username) ? $list->username->mobile_number : ''); ?></a>
                          </td>
                          <td>
                            <a><?php echo e(isset($list->username) ? $list->username->name : ''); ?></a>
                          </td>
                          <td>
                            <a><?php echo e(isset($list->bit_details) ? $list->bit_details->bit->store->name : ''); ?></a>
                          </td>
                         
                          <td>
                            <a><?php echo e(isset($list->bit_details) ? $list->bit_details->bit->game->name : ''); ?></a>
                          </td>
                          
                          <td>
                            <a><?php echo e(isset($list->bit_details) ? $list->bit_details->bit->type : ''); ?></a>
                          </td>
                          <td>
                              <?php if(isset($list->bit_details)): ?>
                                <?php if(isset($list->bit_details->bit_place)): ?>
                                    <a><?php echo e(isset($list->bit_details) ? $list->bit_details->bit_place : ''); ?></a>
                                <?php endif; ?>
                                <?php if(isset($list->bit_details->bit_place_panna)): ?>
                                   <?php if($list->bit_details->bit->type == 'open'): ?>
                                    <a><?php echo e($list->bit_details->bit_place_panna); ?>-<?php echo e($list->bit_details->bit_place_single); ?></a>
                                    <?php else: ?>
                                    
                                    <a><?php echo e($list->bit_details->bit_place_single); ?>-<?php echo e($list->bit_details->bit_place_panna); ?></a>
                                    <?php endif; ?>
                                <?php endif; ?>
                              <?php endif; ?>
                            
                          </td>
                          
                          <td>
                                
                            <a><?php echo e($list->amount); ?></a>
                                 
                          </td>
                          
                          <td>
                                
                            <a><?php echo e($list->userwin->amount); ?></a>
                                 
                          </td>
                          
                          <td>
                                
                            <a><?php echo e(isset($list->userwin) ? 'Win' : 'Loss'); ?></a>
                                 
                          </td>
                          <td>
                                
                            <a><?php echo e($list->created_at); ?></a>
                                 
                          </td>
                        
                        </tr>
                         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                  <tr>
                    <td colspan="6">Record not found </td>
                  </tr>
                  <?php endif; ?>
                            </tbody>
            </table>
                   </div>
                   </div>
                    <div class="row">
              <div class="col-md-6 text-left" style="margin: 20px 0px;">
                Showing  <?php echo e($lists->firstItem()); ?> to <?php echo e($lists->lastItem()); ?> of <?php echo e($lists->total()); ?>

              </div>
              <div class="col-md-6 text-right">
                <?php echo $lists->appends(request()->input())->links(); ?>

              </div>
            </div>
                  </div>
                </div>
              </div>
            </div>
          </div>


 <?php $__env->stopSection(); ?>
<?php $__env->startSection('js-content'); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.main-layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/profcymadev/public_html/whatsappmatka.profcymadev.in/resources/views/admin/user-winner/index.blade.php ENDPATH**/ ?>