File manager - Edit - /home/u300416816/domains/recipeseasy.online/public_html/storage/framework/views/04291d1e45c0840758fe59d6b22875f6.php
Back
<?php $__env->startSection('content'); ?> <!-- Bootstrap CSS (if not already included) --> <!-- Bootstrap Switch CSS --> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.4/css/bootstrap3/bootstrap-switch.min.css" rel="stylesheet"> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1 class="m-0">Games</h1> </div><!-- /.col --> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right ml-1"> <a href="<?php echo e(route('admin.pages.create')); ?>" class="btn btn-primary"><i class="fa fa-plus"></i> Add New</a> </ol> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.container-fluid --> </div> <!-- /.content-header --> <!-- Main content --> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="card"> <!-- /.card-header --> <div class="card-body"> <table id="example2" class="table table-bordered table-hover"> <thead> <tr> <th>#</th> <th>Name</th> <th>Status</th> <th class="text-right">Action</th> </tr> </thead> <tbody> <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e(($pages->currentPage() - 1) * $pages->perPage() + $key + 1); ?></td> <td> <?php if($page->featured_image): ?> <img src="<?php echo e(asset('images/pages/' . $page->featured_image)); ?>" width="30"> <?php endif; ?> <?php echo e($page->title); ?> </td> <td> <input type="checkbox" class="status-switch" data-id="<?php echo e($page->id); ?>" <?php echo e($page->status === 'published' ? 'checked' : ''); ?> data-bootstrap-switch data-off-color="danger" data-on-color="success"> </td> <td class="text-right"> <a href="<?php echo e(route('pages.userpages', $page->slug)); ?>" target="_blank" class="btn btn-primary"><i class="fa fa-eye"></i></a> <a href="<?php echo e(route('admin.pages.edit', $page->id)); ?>" class="btn btn-success"><i class="fa fa-edit"></i></a> <?php if($page->id == 1 | $page->id == 2 | $page->id == 3): ?> <?php else: ?> <a href="<?php echo e(route('admin.pages.delete', $page->id)); ?>" class="btn btn-danger delete"><i class="fa fa-trash"></i></a> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> <!-- Pagination Links --> <div class="d-flex justify-content-center mt-3"> <?php echo e($pages->onEachSide(1)->links('pagination::bootstrap-4')); ?> </div> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </div> <!-- /.container-fluid --> </section> <!-- jQuery (if not already included) --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- Bootstrap Switch JS --> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.4/js/bootstrap-switch.min.js"></script> <script> $(document).ready(function() { $("input[data-bootstrap-switch]").each(function(){ $(this).bootstrapSwitch(); }); // Handle the switch change event $('.status-switch').on('switchChange.bootstrapSwitch', function (event, state) { let categoryId = $(this).data('id'); let isActive = state ? 'published' : 'draft'; $.ajax({ url: '<?php echo e(route("admin.pages.toggleStatus")); ?>', type: 'POST', data: { _token: '<?php echo e(csrf_token()); ?>', id: categoryId, is_active: isActive }, success: function(response) { if(response.success) { toastr.success('Status updated successfully!'); } else { toastr.error('You are can not perform this action in demo mode.'); } }, error: function(xhr) { toastr.error('An error occurred. Please try again.'); } }); }); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('backend.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u300416816/domains/recipeseasy.online/public_html/resources/views/backend/pages/index.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.11 |
proxy
|
phpinfo
|
Settings