
<?php
    $upcomingMatches = App\Models\GameMatch::where('status', 1)->whereHas('category', function($q) {
            $q->where('status', 1);
        })->whereHas('league', function($query) {
            $query->where('status', 1);
        })->where('start_time', '>=', now())->latest()->limit(10)->get();

    $recentWinners = App\Models\Bet::where('status',1)->latest()->limit(10)->with('user')->get(['user_id','return_amount']);
?>
<div class="col sidebar right-sidebar">
    <aside class="sidebar-sticky">
        <?php if($upcomingMatches->count()): ?>
        <div class="sidebar__widget">
            <div class="sidebar__widget-header">
                <h5 class="title"><?php echo app('translator')->get('Upcoming Matches'); ?></h5>
            </div>
            <div class="sidebar__widget-body bg--section">
                <ul class="upcoming__matches">
                    <?php $__currentLoopData = $upcomingMatches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li class="upcoming__item">
                            <h6 class="upcoming__item-title"><?php echo e(__($item->name)); ?></h6>
                            <div class="countdown" data-countdown="<?php echo e(showDateTime($item->start_time,'Y-m-d')); ?>"></div>
                        </li>

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

        <div class="sidebar__widget">
            <div class="sidebar__widget-header">
                <h5 class="title"><?php echo app('translator')->get('Recent Winners'); ?></h5>
            </div>
            <div class="sidebar__widget-body bg--section">
                <ul class="winner-list">
                    <?php $__empty_1 = true; $__currentLoopData = $recentWinners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <li>
                            <a href="javascript:void(0)">
                                <span class="name"><?php echo e(__($item->user->fullname)); ?></span>
                                <span class="amount text--base"><?php echo e(getAmount($item->return_amount)); ?> <?php echo e(__($general->cur_text)); ?></span>
                            </a>
                        </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <li><i class="las la-battery-empty text--base"></i> <small><?php echo app('translator')->get('No winner yet'); ?></small></li>
                    <?php endif; ?>
                </ul>
            </div>
        </div>
    </aside>
</div>
<?php /**PATH /home2/flightbo/public_html/skycrestaviationacademy.com/core/resources/views/templates/basic/partials/rightbar.blade.php ENDPATH**/ ?>