
<?php $__env->startSection('title', 'Transactions'); ?>
<?php $__env->startSection('content'); ?>
<div class="page-header"><h1>Transactions</h1><p>Monitor all user deposits and withdrawals</p></div>

<form class="toolbar" method="GET">
    <input type="search" name="search" class="md-input" placeholder="Search user..." value="<?php echo e(request('search')); ?>">
    <select name="type" class="md-select">
        <option value="all">All Types</option>
        <option value="deposit" <?php if(request('type')==='deposit'): echo 'selected'; endif; ?>>Deposit</option>
        <option value="withdrawal" <?php if(request('type')==='withdrawal'): echo 'selected'; endif; ?>>Withdrawal</option>
        <option value="transfer" <?php if(request('type')==='transfer'): echo 'selected'; endif; ?>>Transfer</option>
    </select>
    <button type="submit" class="md-btn md-btn-filled">Filter</button>
</form>

<div class="md-card">
    <div class="table-wrap">
        <table class="md-table">
            <thead><tr><th>ID</th><th>User</th><th>Type</th><th>Details</th><th>Amount</th><th>Status</th><th>Date</th></tr></thead>
            <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tx): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td><?php echo e($tx->id); ?></td>
                    <td><?php echo e($tx->user->name); ?></td>
                    <td><?php echo e(ucfirst($tx->type)); ?></td>
                    <td style="max-width:280px"><?php echo e($tx->details); ?></td>
                    <td>$<?php echo e(number_format($tx->amount, 2)); ?></td>
                    <td><span class="badge <?php echo e($tx->status->badgeClass()); ?>"><?php echo e($tx->status->label()); ?></span></td>
                    <td><?php echo e($tx->created_at->format('Y-m-d H:i:s')); ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="7" style="text-align:center;padding:2rem">No transactions</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
    <div style="padding:1rem"><?php echo e($transactions->links()); ?></div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\SkyApps\Projects\web3derp\resources\views/admin/transactions/index.blade.php ENDPATH**/ ?>