    <!-- ========== Left Sidebar Start ========== -->

    <?php echo $__env->make('backend.include.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <!-- Left Sidebar End -->

    <!-- ============================================================== -->
    <!-- Start Page Content here -->
    <!-- ============================================================== -->

    <div class="content-page">
        <div class="content">
            <!-- Topbar Start -->
            <?php echo $__env->make('backend.include.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <!-- end Topbar -->

            <!-- Start Content-->
            <div class="container-fluid">

                <!-- start page title -->
                <div class="row">
                    <div class="col-12">
                        <div class="page-title-box">
                            <div class="page-title-right">
                                <ol class="breadcrumb m-0">
                                    <a href="<?php echo e(route('blog.create')); ?>" class="btn btn-sm btn-dark waves-effect">
                                        <i class="mdi mdi-plus me-1"></i> Add Blog
                                    </a>
                                </ol>
                            </div>
                            <h4 class="page-title">All Blogs</h4>
                        </div>
                    </div>
                </div>

                <!-- end page title -->

                <div class="row">
                    <div class="card">
                        <div class="card-body">
                            <table class="table table-striped table-centered mb-0">
                                <thead>
                                    <tr>
                                        <th>Image</th>
                                        <th>Title</th>
                                        <th>Short Description</th>
                                        <th>Active</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody>

                                    <?php $__currentLoopData = $blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                        <tr>
                                            <td class="table-user">
                                                <img id="blah" src="<?php echo e(URL::asset('backend/images/blog/' . $blog->image)); ?>"
                                                alt="your image" onerror="this.onerror=null; this.src='backend/images/no_image.svg'"/>
                                            </td>
                                            <td><?php echo e($blog->title); ?></td>
                                            <td><?php echo e($blog->short_description); ?></td>
                                            <td>
                                                <!-- Switch-->
                                                <div>
                                                    <input type="checkbox" data-id="<?php echo e($blog->id); ?>" id="switch_<?php echo e($blog->id); ?>" class="toggle-classs" value="<?php echo e($blog->id); ?>" <?php echo e($blog->status ? 'checked' : ''); ?> data-switch="success" />
                                                    <label for="switch_<?php echo e($blog->id); ?>"  data-on-label="Yes" data-off-label="No"
                                                        class="mb-0 d-block"></label>
                                                </div>
                                            </td>
                                            <td class="table-action d-flex">

                                                <a href="<?php echo e(route('blog.edit',$blog->id)); ?>" class="action-icon"> <i
                                                        class="mdi mdi-pencil"></i></a>

                                                <form action="<?php echo e(route('blog.destroy', $blog->id)); ?>" method="POST">
                                                    <?php echo method_field('DELETE'); ?>
                                                    <?php echo csrf_field(); ?>
                                                    <button class="btn text-danger btn-sm"
                                                        onclick="return areyousure();  " title="Delete"  class="action-icon">
                                                         <i class="mdi mdi-delete"
                                                            aria-hidden="true"></i> </button>
                                                </form>
                                            </td>
                                        </tr>


                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

            </div>
            <!-- container -->

        </div>
        <!-- content -->

    </div>

    </div>
    <!-- END wrapper -->

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>


    <script>
        $(function() {
            $('.toggle-classs').click(function() {
                var status = $(this).prop('checked') == true ? 1 : 0;
                var id = $(this).attr('value');
                $.ajax({
                    type: "GET",
                    dataType: "json",
                    url: "<?php echo e(route('blogstatus')); ?>",
                    data: {'status': status, 'id': id},
                    success: function(data){
                        {

                            $.NotificationApp.send("Success" ,data.success,"top-right", "rgba(0,0,0,0.2)", "success")
                        }
                    }
                });
            })
        })
      </script>

    <!-- Footer Start -->
    <?php echo $__env->make('backend.include.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <!-- end Footer -->

<?php /**PATH C:\xampp\htdocs\kanishka_laravel\resources\views/backend/blog/index.blade.php ENDPATH**/ ?>