

<?php $__env->startSection('content'); ?>
    <div class="container">
        <div class="row">
            <div class="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"> Advertisements List </h3>
                    </div>
                    <div>
                        <a href="<?php echo e(route('advertisements.create')); ?>" class="btn btn-white">Create </a>
                    </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>#</th>
                            <th>Image Name</th>
                            <th>Image</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $advertisements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $advertisement): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($advertisement->id); ?></td>
                                <td><?php echo e($advertisement->image_name); ?></td>
                                <td><img src="<?php echo e(asset($advertisement->image)); ?>" alt="<?php echo e($advertisement->image_name); ?>"
                                        width="100"></td>
                                <td>
                                    <a href="<?php echo e(route('advertisements.edit', $advertisement->id)); ?>"
                                        class="btn btn-warning btn-sm">Edit</a>
                                    <form action="<?php echo e(route('advertisements.destroy', $advertisement->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">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.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\advertisements\index.blade.php ENDPATH**/ ?>