

<?php $__env->startSection('content'); ?>
<main>
    <div class="container-fluid px-4">
        <h1 class="mt-4">Announcements</h1>
        <ol class="breadcrumb mb-4">
            <li class="breadcrumb-item active">Announcements</li>
        </ol>
        <div class="row">
            <div class="col-xl-12 mb-4">
                <!-- Add announcement button -->
                <div class="d-flex justify-content-end">
                    <a href="<?php echo e(route('announcement.index')); ?>" class="btn btn-primary">Add Announcement</a>
                </div>
            </div>
            <div class="col-xl-12">
                <div class="card mb-4">
                    <div class="card-header">
                        <i class="fas fa-table me-1"></i>
                        Announcement Details
                    </div>
                    <div class="card-body">
                        <table id="announcementTable" class="table">
                            <thead>
                                <tr>
                                    <th>Title</th>
                                    <th>Announcement</th>
                                    <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $announcements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $announcement): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($announcement->title); ?></td>
                                    <td><?php echo e($announcement->announcement); ?></td>
                                    <td>
                                        <!-- Edit button -->
                                        <a href="<?php echo e(route('announcement.edit', $announcement->id)); ?>" class="btn btn-primary btn-sm">Edit</a>
                                        <!-- Delete button -->
                                        <form action="<?php echo e(route('announcement.destroy', $announcement->id)); ?>" method="POST" style="display: inline;">
                                            <?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>
        </div>
    </div>
</main>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\91638\VB150\VB150\resources\views/announcement/list.blade.php ENDPATH**/ ?>