

<?php $__env->startSection('content'); ?>
<div class="container">
    <h2 class="text-white">Page Banners</h2>
    <a href="<?php echo e(route('page-banners.create')); ?>" class="btn btn-success mb-3">+ Add New Banner</a>

    <?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>Page</th>
                <th>Title</th>
                <th>Image</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $banners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $banner): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e(ucfirst($banner->page)); ?></td>
                    <td><?php echo e($banner->title); ?></td>
                    <td>
                        <img src="<?php echo e(asset($banner->image)); ?>" width="120" height="60" alt="Banner">
                    </td>
                    <td>
                        <a href="<?php echo e(route('page-banners.edit', $banner->id)); ?>" class="btn btn-primary btn-sm">Edit</a>
                        <form action="<?php echo e(route('page-banners.destroy', $banner->id)); ?>" method="POST" style="display:inline-block;">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button onclick="return confirm('Are you sure?')" class="btn btn-danger btn-sm">Delete</button>
                        </form>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.admin-dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/pataneye/public_html/resources/views/admin/pages/page-banners/index.blade.php ENDPATH**/ ?>