

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


                <div class="d-flex justify-content-between align-items-center">
                    <div class="mb-2 mb-lg-0">
                        <h3 class="mb-0  text-white"> Services Product List </h3>
                    </div>
                    <div>
                        <a href="<?php echo e(route('service-products.create')); ?>" class="btn btn-white">Create </a>
                    </div>
                </div>

            </div>
            <div class="col-12 mt-3">

                <table class="table table-bordered table-hover bg-white">
                    <thead class="thead-light">
                        <tr>
                            <th>#</th>
                            <th>Category</th>
                            <th>Title</th>
                            <th>Description</th>
                            <th>Image</th>
                            <th width="160">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td><?php echo e($index + 1); ?></td>
                                <td><?php echo e($product->scategory->name ?? '-'); ?></td>
                                <td><?php echo e($product->title); ?></td>
                                <td><?php echo Str::limit(strip_tags($product->description), 60); ?></td>
                                <td>
                                    <?php if($product->image): ?>
                                        <img src="<?php echo e(asset($product->image)); ?>" width="80">
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <a href="<?php echo e(route('service-products.edit', $product->id)); ?>"
                                        class="btn btn-sm btn-warning">Edit</a>
                                    <form action="<?php echo e(route('service-products.destroy', $product->id)); ?>" method="POST"
                                        class="d-inline-block" onsubmit="return confirm('Are you sure?');">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('DELETE'); ?>
                                        <button class="btn btn-sm btn-danger">Delete</button>
                                    </form>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="6" class="text-center">No service products found.</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>

        </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/service-products/index.blade.php ENDPATH**/ ?>