
<?php $__env->startSection('content'); ?>
    <div class="card">
        <div class="card-header d-flex justify-content-between">
            <h5>Manage Services</h5>
            <a href="<?php echo e(route('service.create')); ?>" class="btn btn-primary btn-sm">+ Add Service</a>
        </div>
        <div class="card-body">
            <?php echo $__env->make('components.alert', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <div class="table-responsive">
                <table class="table table-bordered w-100" id="dt-responsive">
                    <thead class="thead-light">
                        <tr>
                            <th>S/L</th>
                            <th>Category</th>
                            <th>Image</th>
                            <th>Title</th>
                            <th>Subtitle</th>
                            <th>Description</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($loop->iteration); ?></td>
                                <td><?php echo e($service->serviceCategory->name ?? 'N/A'); ?></td>
                                <td>
                                    <?php if($service->image): ?>
                                        <img src="<?php echo e(asset($service->image)); ?>" alt="" width="60">
                                    <?php endif; ?>
                                </td>
                                <td><?php echo e($service->title); ?></td>
                                <td><?php echo e($service->subtitle); ?></td>
                                <td><?php echo e(Str::limit($service->description, 50)); ?></td>
                                <td>
                                    <a href="<?php echo e(route('service.edit', $service->id)); ?>" class="btn btn-sm btn-info">Edit</a>
                                    <form action="<?php echo e(route('service.destroy', $service->id)); ?>" method="POST"
                                        style="display:inline-block" onsubmit="return confirm('Delete this service?')">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('DELETE'); ?>
                                        <button class="btn btn-sm btn-danger" type="submit">Delete</button>
                                    </form>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

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