

<?php $__env->startSection('content'); ?>
    <div class="content-wrapper p-3">
        <div class="container-fluid">
            <h2>Daftar Produk</h2>
            <a href="<?php echo e(route('products.create')); ?>" class="btn btn-primary mb-3">Tambah Produk</a>
            <table class="table table-bordered">
                <thead>
                    <tr>
                        <th>Nama</th>
                        <th>Harga</th>
                        <th>Brand</th>
                        <th>Kategori</th>
                        <th>Gender</th>
                        <th>Deskripsi</th>
                        <th>Gambar</th>
                        <th>Aksi</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($p->name); ?></td>
                            <td>Rp <?php echo e($p->harga); ?></td>
                            <td><?php echo e($p->brand); ?></td>
                            <td><?php echo e($p->category); ?></td>
                            <td><?php echo e($p->gender); ?></td>
                            <td><?php echo e($p->deskripsi); ?></td>
                            <td><img src="<?php echo e(asset('storage/' . $p->image)); ?>" width="100"></td>
                            <td>
                                <a href="<?php echo e(route('products.edit', $p->id)); ?>" class="btn btn-warning btn-sm">Edit</a>
                                <form action="<?php echo e(route('products.destroy', $p->id)); ?>" method="POST"
                                    style="display:inline-block;">
                                    <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                    <button class="btn btn-danger btn-sm"
                                        onclick="return confirm('Yakin ingin menghapus?')">Hapus</button>
                                </form>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\omah_sepatu\resources\views/products/index.blade.php ENDPATH**/ ?>