<?php $__env->startSection('title', 'Bettings'); ?>
<?php $__env->startSection('content'); ?>
    <!-- Start Main Content -->
    <?php if (isset($component)) { $__componentOriginal4b618dfe3ab6b4ad65822dcc90cd3bb4 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal4b618dfe3ab6b4ad65822dcc90cd3bb4 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.session-messages','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('session-messages'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal4b618dfe3ab6b4ad65822dcc90cd3bb4)): ?>
<?php $attributes = $__attributesOriginal4b618dfe3ab6b4ad65822dcc90cd3bb4; ?>
<?php unset($__attributesOriginal4b618dfe3ab6b4ad65822dcc90cd3bb4); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal4b618dfe3ab6b4ad65822dcc90cd3bb4)): ?>
<?php $component = $__componentOriginal4b618dfe3ab6b4ad65822dcc90cd3bb4; ?>
<?php unset($__componentOriginal4b618dfe3ab6b4ad65822dcc90cd3bb4); ?>
<?php endif; ?>
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-header">
                    <h4>Bettings</h4>
                    <div class="card-header-form">
                        <?php if (isset($component)) { $__componentOriginal61542037d001e2034791c9aff5866543 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal61542037d001e2034791c9aff5866543 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.search-bar','data' => ['route' => ''.e(route('bettings.index')).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('search-bar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['route' => ''.e(route('bettings.index')).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal61542037d001e2034791c9aff5866543)): ?>
<?php $attributes = $__attributesOriginal61542037d001e2034791c9aff5866543; ?>
<?php unset($__attributesOriginal61542037d001e2034791c9aff5866543); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal61542037d001e2034791c9aff5866543)): ?>
<?php $component = $__componentOriginal61542037d001e2034791c9aff5866543; ?>
<?php unset($__componentOriginal61542037d001e2034791c9aff5866543); ?>
<?php endif; ?>
                    </div>
                </div>
                <div class="card-body p-0">
                    <div class="row m-1">
                        <?php $__currentLoopData = $bettings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $betting): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td>
                                    <div class="col-4">
                                        <div class="card card-primary">
                                            <div class="card-body">
                                                <div style="height: 250px; overflow: auto;">
                                                    <table class="table table-bordered">
                                                        <thead>
                                                            <h4>Betting id: #<?php echo e($betting->id); ?></h4>
                                                        </thead>
                                                        <tbody>
                                                            <tr>
                                                                <td>Game id: #<?php echo e($betting->game->id); ?></td>
                                                                <td>Customer Name: <?php echo e($betting->name); ?></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Agent Name: <?php echo e($betting->agent->name); ?></td>
                                                                <td>Agent phone: <?php echo e($betting->agent->phone); ?></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Date: <?php echo e($betting->created_at->format('d-m-y')); ?></td>
                                                                <td>Time: <?php echo e($betting->created_at->format('h-i a')); ?></td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div style="height: 250px; overflow: auto;">
                                                    <table class="table table-bordered text-center">
                                                        <thead>
                                                            <tr>
                                                                <th>Numbers</th>
                                                                <th>Amount</th>
                                                                <th>Winnings</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <?php $__currentLoopData = $betting->details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $bet): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <tr>
                                                                    <td><?php echo e($bet->bet_number); ?></td>
                                                                    <td><?php echo e($bet->amount); ?></td>
                                                                    <td><?php echo e($bet->winnings); ?></td>
                                                                </tr>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </tbody>
                                                        <tfoot>
                                                            <tr>
                                                                <th>Total</th>
                                                                <th><span
                                                                        class="badge badge-primary"><?php echo e($betting->total_amount); ?></span>
                                                                </th>
                                                                <th><span
                                                                        class="badge badge-primary"><?php echo e($betting->total_winnings); ?></span>
                                                                </th>
                                                            </tr>
                                                        </tfoot>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                    <?php echo e($bettings->links()); ?>

                    <?php if (! (filled($bettings))): ?>
                        <div class="mx-4 my-4 d-flex justify-content-center">
                            <h5> No games bettings added yet.</h5>
                        </div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
    </div>
    <!-- End Main Content -->

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/payfromupi/public_html/mplotteryking.site/resources/views/admin/bettings/index.blade.php ENDPATH**/ ?>