<?php $__env->startSection('title'); ?>
    User Orders
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <div class="content-wrapper">

        <section class="content">
            <div class="container-fluid">

                <div class="row">
                    <!-- left column -->
                    <div class="col-md-12 mt-5">

                        <div class="card table-shadow">

                            <div class="card-body">
                                <h2>User Orders</h2>
                                <table id="example" class="table table-striped table-bordered" style="width:100%">
                                    <thead>
                                        <tr>
                                            <th>User Name</th>
                                            <th>Total Price</th>
                                            <th>Tracking No</th>
                                            <th>Order Status</th>
                                            <th>Detail View</th>
                                        </tr>
                                    </thead>

                                    <tbody>
                                        <?php $__currentLoopData = $get_orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($order->first_name ?? 'Guest'); ?></td>
                                                <td><?php echo e($order->total_price ?: ''); ?></td>
                                                <td><?php echo e($order->tracking_no ?: ''); ?></td>
                                                <td>
                                                    <span
                                                        class="
                                                <?php if($order->order_status == 'Pending'): ?> badge badge-pill badge-info
                                                <?php elseif($order->order_status == 'In-progress'): ?> badge badge-pill badge-primary
                                                  <?php elseif($order->order_status == 'Complete'): ?> badge badge-pill badge-success
                                                <?php elseif($order->order_status == 'Decline'): ?> badge badge-pill badge-danger <?php endif; ?>">
                                                        <?php echo e($order->order_status); ?>

                                                    </span>

                                                </td>

                                                <td><a href="<?php echo e(route('admin.order.detail', ['id' => $order->id])); ?>">Detail
                                                        View</a></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>

                                </table>

                            </div>

                            <!-- /.card -->
                        </div>
                    </div>

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

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

<?php $__env->startSection('script'); ?>
    <script>
        $(document).ready(function() {
            $("table").DataTable({
                order: [0, 'dec']
            });
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin-layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/servicedemoweb/public_html/luxury-candles/resources/views/user/order/index.blade.php ENDPATH**/ ?>