<?php $__env->startSection('title', 'Add Testimonial Details'); ?>
<?php $__env->startSection('section'); ?>

    <style>
        .switch {
            position: relative;
            display: block;
            width: 60px;
            height: 34px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            -webkit-transition: .4s;
            transition: .4s;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            -webkit-transition: .4s;
            transition: .4s;
        }

        input:checked + .slider {
            background-color: #2196F3;
        }

        input:focus + .slider {
            box-shadow: 0 0 1px #2196F3;
        }

        input:checked + .slider:before {
            -webkit-transform: translateX(26px);
            -ms-transform: translateX(26px);
            transform: translateX(26px);
        }

        /* Rounded sliders */
        .slider.round {
            border-radius: 34px;
        }

        .slider.round:before {
            border-radius: 50%;
        }

        .help-block {
            color: red;
        }

        .has-error {
            border-block-color: red;
        }

        img {
            object-fit: contain !important;
            height: 100px !important;
            margin: 0 auto;
            display: flex;

        }
    </style>

    <?php
        if (!empty($testimonial->content)) {
            // Decode the 'content' JSON string into an associative array.
            $decodedData = json_decode($testimonial->content, true);
        }
    ?>
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>Testimonial Form</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">Home</a></li>
                            <li class="breadcrumb-item active">Testimonial Form</li>
                        </ol>
                    </div>
                </div>
            </div><!-- /.container-fluid -->
        </section>
        <!-- /.content-header -->


        <section class="content">
            <div class="container-fluid">

                <div class="row">
                    <!-- left column -->
                    <div class="col-md-12">
                        <form class="category-form" method="post" action="<?php echo e(route('admin.testimonial-single')); ?>"
                              enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>

                            <div class="card card-primary">

                                <div class="card-body">
                                    <div class="tab-content text-center">

                                        <div class="tab-pane active" role="tabpanel" id="product">
                                            <h2>Testimonial Section</h2>


                                            <div class="col-md-4 mx-auto">
                                                <label for="">Top Title</label>
                                                <input type="text" name="top_title" placeholder="Meta Title"
                                                       class="form-control"
                                                       value="<?php echo e(!empty($testimonial) ? $decodedData['top_title'] : ''); ?>">
                                            </div>

                                            <br>
                                            <input type="submit" value="Submit" id="submit_btn" class="btn btn-primary">
                                        </div>


                                    </div>

                                </div>
                        </form>

                        <!-- /.card -->
                    </div>
                </div>

            </div>
        </section>

        <section class="content">
            <div class="container-fluid">

                <div class="row">
                    <!-- left column -->
                    <div class="col-md-12">

                        <div class="card card-primary">

                            <div class="card-body">
                                <a href="<?php echo e(route('cms-testimonial')); ?>">
                                    <button type="button" class="btn btn-primary btn-sm float-right mb-5">
                                        Add Testimonial
                                    </button>
                                </a>
                                <h2>Testimonial Section</h2>

                                <table id="example" class="table table-striped table-bordered" style="width:100%">
                                    <thead>
                                    <tr>
                                        <th>Heading</th>
                                        <th>Sub Heading</th>
                                        <th>Image</th>
                                        <th>Edit</th>
                                        <th>Delete</th>

                                    </tr>
                                    </thead>

                                    <tbody>
                                    <?php $__currentLoopData = $all_get_testimonials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $all_get_testimonial): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>

                                            <td><?php echo e($all_get_testimonial->heading); ?></td>
                                            <td><?php echo e($all_get_testimonial->sub_heading); ?></td>
                                            <td><img src="<?php echo e(asset('/upload/cms_images/'.$all_get_testimonial->image)); ?>"
                                                     style="with:80px;height:80px;"></td>
                                            <td>
                                                <a href="<?php echo e(url('admin/cms/testimonial-edit/'.$all_get_testimonial->id)); ?>"
                                                   class="btn btn-success btn-sm">Edit</a></td>
                                            <td>
                                                <a href="<?php echo e(url('admin/cms/testimonial-delete/'.$all_get_testimonial->id)); ?>"
                                                   class="btn btn-danger btn-sm">Delete</a></td>

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


                                    </tbody>

                                </table>

                            </div>


                            <!-- /.card -->
                        </div>
                    </div>

                </div>
        </section>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>

    <script>

        $(document).ready(function () {
            $("table").DataTable({
                order: [0, 'dec']
            });
        });

    </script>


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

<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/servicedemoweb/public_html/global-man-cave/resources/views/admin/page/testimonial.blade.php ENDPATH**/ ?>