

<?php $__env->startSection('content'); ?>
<div class="container">
    <h1 class="mb-4">Exhibits</h1>

    <a href="<?php echo e(route('exhibits.create')); ?>" class="btn btn-primary mb-3">Add New Exhibit</a>

    <?php if(session('success')): ?>
        <div class="alert alert-success"><?php echo e(session('success')); ?></div>
    <?php endif; ?>

    <table class="table table-bordered">
        <thead class="table-dark">
            <tr>
                <th>ID</th>
                <th>Gallery</th>
                <th>Name</th>
                <th>Language</th>
                <th>Icon</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $exhibits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $exhibit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($exhibit->id); ?></td>
                    <td><?php echo e($exhibit->gallery->gallery_name); ?></td>
                    <td><?php echo e($exhibit->exhibit_name); ?></td>
                    <td><?php echo e($exhibit->language); ?></td>
                    <td>
                        <?php if($exhibit->exhibit_icon_path): ?>
                            <img src="<?php echo e(asset('storage/' . $exhibit->exhibit_icon_path)); ?>" width="50">
                        <?php else: ?>
                            N/A
                        <?php endif; ?>
                    </td>
                    <td>
                        <a href="<?php echo e(route('exhibits.edit', $exhibit->id)); ?>" class="btn btn-warning btn-sm">Edit</a>
                        <form action="<?php echo e(route('exhibits.destroy', $exhibit->id)); ?>" method="POST" style="display:inline;">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Delete this exhibit?');">Delete</button>
                        </form>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/museum-app/resources/views/exhibits/index.blade.php ENDPATH**/ ?>