<?php $__env->startSection('content'); ?>
<div class="container app-content pt-3">
    <h1 class="h3 mb-4">Pages</h1>
    <div class="py-3">
        <a href="<?php echo e(route('admin.page.create')); ?>" class="btn btn-success"><i class="mr-2 fa fa-plus"></i>Add Page</a>
    </div>
    <div class="card">
        <div class="table-responsive">
            <table class="table card-table table-vcenter">
                <thead class="thead-light">
                    <tr>
                        <th>Title</th>
                        <th>Slug</th>
                        <th>Created At</th>
                        <th>Updated At</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($page->title); ?></td>
                            <td><?php echo e($page->slug); ?></td>
                            <td class="text-muted"><?php echo e($page->created_at); ?></td>
                            <td class="text-muted"><?php echo e($page->updated_at); ?></td>
                            <td>
                                
                                <a href="<?php echo e(route('admin.page.edit', $page)); ?>" class="btn btn-warning btn-sm" type="button">Edit</a>
                                <a href="<?php echo e(route('admin.page.destroy', $page)); ?>" class="btn btn-danger btn-sm"
                                    onclick="event.preventDefault();document.getElementById('delete-<?php echo e($page->id); ?>').submit();">Delete</a>

                                <form id="delete-<?php echo e($page->id); ?>" action="<?php echo e(route('admin.page.destroy', $page)); ?>" method="POST" style="display: none;">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                </form>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>

        <?php if($pages->hasPages()): ?>
            <div class="card-footer">
                <?php echo e($pages->links()); ?>

            </div>
        <?php endif; ?>

    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\mopie-14\engine\resources\views/pages/index.blade.php ENDPATH**/ ?>