

<?php $__env->startSection('content'); ?>
    <div class="row  " >
        <div class="col-lg-12 col-md-12 col-12">

            <div>
                <div class="d-flex justify-content-between align-items-center">
                    <div class="mb-2 mb-lg-0">
                        <h3 class="mb-0  text-white"> Category List</h3>
                    </div>
                    <div>
                        <a href="<?php echo e(route('menu-categories.create')); ?>" class="btn btn-white">Create Category</a>
                    </div>
                </div>
            </div>
        </div>
   
        <div class="col-12 mt-3">
            <?php if(session('success')): ?>
                <div class="alert alert-success"><?php echo e(session('success')); ?></div>
            <?php endif; ?>


            <table class="table table-bordered bg-white">
                <thead>
                    <tr>
                        <th>Name</th>
                        <th>Image</th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($category->name); ?></td>
                            <td>
                                <?php if($category->image): ?>
                                    <img src="<?php echo e(asset($category->image)); ?>" alt="<?php echo e($category->name); ?>" width="100">
                                <?php else: ?>
                                    No image
                                <?php endif; ?>
                            </td>
                            <td>
                                <a href="<?php echo e(route('menu-categories.edit', $category->id)); ?>"
                                    class="btn btn-primary btn-sm" data-bs-toggle="tooltip" title="Edit Category">
                                    <i class="bi bi-pencil-square text-white"></i>
                                </a>
                                <form action="<?php echo e(route('menu-categories.destroy', $category->id)); ?>" method="POST"
                                    style="display:inline-block;">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" title="Delete Category">
                                        <i class="bi bi-archive"></i>
                                    </button>
                                </form>
                            </td>
                            
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.admin-dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\HP\Desktop\eye-clinic\project\eye-clinic\resources\views/admin/pages/menu-categories/index.blade.php ENDPATH**/ ?>