

<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="container-header">
        <h1><?php echo e($title); ?></h1>
    </div>

    <div class="card table-card">
        <div class="table-header">
            <form method="get" action="<?php echo e(route('backend.account-orders.index')); ?>" class="table-search-form">
                <div class="table-search">
                    <input type="text" name="search" class="search-input" placeholder="Search by user email or name..." value="<?php echo e($search ?? ''); ?>">
                    <i class="las la-search"></i>
                </div>
                <button type="submit" class="btn btn-secondary search-btn">Search</button>
            </form>
        </div>
        <div class="table-responsive">
            <table class="table">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>User</th>
                        <th>Amount</th>
                        <th>Date</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $o): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td><?php echo e($orders->firstItem() + $loop->index); ?></td>
                        <td><?php echo e($o->user->email ?? '-'); ?> (<?php echo e($o->user->fname ?? ''); ?> <?php echo e($o->user->lname ?? ''); ?>)</td>
                        <td><?php echo e(number_format($o->total_amount, 2)); ?></td>
                        <td><?php echo e($o->created_at->format('Y-m-d H:i')); ?></td>
                        <td>
                            <a href="<?php echo e(route('backend.account-orders.show', $o->id)); ?>" class="btn btn-sm btn-outline">View</a>
                        </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr><td colspan="5" class="text-center">No orders yet.</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
        <div class="pagination-wrapper">
            <?php echo e($orders->links('vendor.pagination.default')); ?>

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

<?php echo $__env->make('backend.layout.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\HP\Desktop\social\product\core\resources\views/backend/products/orders/index.blade.php ENDPATH**/ ?>