<?php $__env->startSection('contenta'); ?>
         <!-- Full Table -->
    <div class="block">
        <div class="block-header block-header-default">
            <h3 class="block-title">List of Ssubmenus</h3>
        </div>
        <div class="block-content">
            <a class="btn btn-info" href="<?php echo e(route('submenus.create')); ?>">Add</a>
            <div class="table-responsive">
                <table class="table table-striped table-vcenter" id="table">
                    <thead>
                        <tr>
                            <th>S/N</th>
                            <th>Submenu</th>
                            <th>Description</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $submenus; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $submenu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e(++$i); ?></td>
                                <td><?php echo e($submenu->name); ?></td>
                                <td><?php echo e($submenu->description); ?></td>
                                <td>
                                    <a class="btn btn-info" href="<?php echo e(route('submenus.show',$submenu)); ?>">Show</a>
                                    <a class="btn btn-primary" href="<?php echo e(route('submenus.edit',$submenu->id)); ?>">Edit</a>
                                    <?php echo Form::open(['method' => 'DELETE','route' => ['submenus.destroy', $submenu->id],'style'=>'display:inline', 'class'=>'delete']); ?>

                                        <?php echo Form::submit('Delete', ['class' => 'btn btn-danger']); ?>

                                    <?php echo Form::close(); ?>

                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
                <?php echo e($submenus->links()); ?>

            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js_aftera'); ?>
    <script>
        //alert('hi');
        const deletefrms = document.querySelectorAll('.delete');
        deletefrms.forEach(deletefrm=>{
            deletefrm.addEventListener('submit', e =>{
                e.preventDefault();
                //alert('hi');
                const conf = confirm('are you sure you want to delete');
                conf? deletefrm.submit():"";
            });
        });

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

<?php echo $__env->make('layouts.portalsettings', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ncaa/public_html/resources/views/portalsettings/submenus/index.blade.php ENDPATH**/ ?>