File manager - Edit - /home/u300416816/domains/majalrib7.com/public_html/storage/framework/views/7f44144cd872e2ec786afe4025213b2a.php
Back
<?php $__env->startSection('content'); ?> <!-- Bootstrap CSS (if not already included) --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> <!-- 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">Blog Categories</h1> </div><!-- /.col --> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right ml-1"> <a href="<?php echo e(route('admin.blog.categories.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>Description</th> <th>Status</th> <th class="text-right">Action</th> </tr> </thead> <tbody> <?php $__currentLoopData = $blogCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e(($blogCategories->currentPage() - 1) * $blogCategories->perPage() + $key + 1); ?></td> <td> <?php echo e($category->name); ?> </td> <td><?php echo Str::limit($category->description, 50, '...'); ?></td> <td> <input type="checkbox" class="status-switch" data-id="<?php echo e($category->id); ?>" <?php echo e($category->status ? 'checked' : ''); ?> data-bootstrap-switch data-off-color="danger" data-on-color="success"> </td> <td class="text-right"> <a href="<?php echo e(route('admin.blog.categories.edit', $category->id)); ?>" class="btn btn-success"><i class="fa fa-edit"></i></a> <a href="<?php echo e(route('admin.blog.categories.delete', $category->id)); ?>" class="btn btn-danger delete"><i class="fa fa-trash"></i></a> </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($blogCategories->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 ? 1 : 0; $.ajax({ url: '<?php echo e(route("admin.blog.categories.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('Status update failed.'); } }, 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 E:\Laravel Codester\gaming_zone\resources\views/backend/blog-category/index.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.12 |
proxy
|
phpinfo
|
Settings