👁 查看:c255889eee26064e27658bec6dfe37260bafc497.php
路径:/home/boguraj1/.trash/storage/framework/views/c255889eee26064e27658bec6dfe37260bafc497.php
大小:4.6 KB · 修改:2026-07-23 16:13:46 · 权限:0644 · 可写
<?php $__env->startSection('title', 'Orders'); ?>

<?php $__env->startSection('content'); ?>
<div class="d-flex justify-content-between mb-4">
    <h5 class="fw-bold mb-0">All Orders</h5>
</div>

<div class="card mb-3">
    <div class="card-body py-2 px-4">
        <form class="row g-2 align-items-center" method="GET">
            <div class="col-sm-4">
                <input type="text" name="search" class="form-control form-control-sm" placeholder="Order#, name, mobile..." value="<?php echo e(request('search')); ?>">
            </div>
            <div class="col-sm-3">
                <select name="status" class="form-select form-select-sm">
                    <option value="">All Status</option>
                    <?php $__currentLoopData = ['pending','confirmed','processing','shipped','delivered','cancelled']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($s); ?>" <?php echo e(request('status') == $s ? 'selected' : ''); ?>><?php echo e(ucfirst($s)); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
            <div class="col-sm-2 d-flex gap-2">
                <button type="submit" class="btn btn-sm btn-danger">Filter</button>
                <a href="<?php echo e(route('admin.orders.index')); ?>" class="btn btn-sm btn-outline-secondary">Reset</a>
            </div>
        </form>
    </div>
</div>

<div class="card">
    <div class="card-body p-0">
        <div class="table-responsive">
            <table class="table mb-0">
                <thead>
                    <tr>
                        <th class="px-4">Order #</th>
                        <th>Customer</th>
                        <th>Mobile</th>
                        <th>Items</th>
                        <th>Total</th>
                        <th>Status</th>
                        <th>Date</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td class="px-4"><a href="<?php echo e(route('admin.orders.show', $order)); ?>" class="fw-semibold text-decoration-none" style="color:var(--primary)"><?php echo e($order->order_number); ?></a></td>
                        <td><?php echo e($order->name); ?></td>
                        <td><?php echo e($order->mobile); ?></td>
                        <td><span class="badge bg-light text-dark border"><?php echo e($order->items->count()); ?></span></td>
                        <td class="fw-bold">৳<?php echo e(number_format($order->total, 0)); ?></td>
                        <td><span class="badge bg-<?php echo e($order->status_badge); ?>"><?php echo e(ucfirst($order->status)); ?></span></td>
                        <td class="text-muted" style="font-size:12px"><?php echo e($order->created_at->format('d M Y')); ?></td>
                        <td>
                            <a href="<?php echo e(route('admin.orders.show', $order)); ?>" class="btn btn-sm btn-outline-primary me-1"><i class="bi bi-eye"></i></a>
                            <form action="<?php echo e(route('admin.orders.destroy', $order)); ?>" method="POST" class="d-inline" onsubmit="return confirm('Delete this order?')">
                                <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                <button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
                            </form>
                        </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr><td colspan="8" class="text-center py-5 text-muted">No orders found.</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
    <?php if($orders->hasPages()): ?>
    <div class="card-footer bg-white"><?php echo e($orders->withQueryString()->links('pagination::bootstrap-5')); ?></div>
    <?php endif; ?>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\ecommerce\resources\views/admin/orders/index.blade.php ENDPATH**/ ?>