
<?php $__env->startSection('title', 'Service'); ?>
<?php $__env->startPush('css'); ?>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>

    <!-- Main Content -->
    <div class="main-content">
        <section class="section">
            <div class="col-12 section-header">
                <div class="col-6">
                    <h1> Edit </h1>
                </div>

            </div>
            <?php if($errors->any()): ?>
                <div class="col-sm-12">
                    <div class="alert  alert-warning alert-dismissible fade show" role="alert">
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <span>
                                <p><?php echo e($error); ?></p>
                            </span>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                </div>
            <?php endif; ?>

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

            <div class="section-body">
                <div class="col-12">
                    <div class="row">
                        <div class="col-lg-10">

                            <form method="POST" action="<?php echo e(route('service.update', $id)); ?>" id="editForm"
                                enctype="multipart/form-data">
                                <?php echo e(method_field('PATCH')); ?>

                                <?php echo e(csrf_field()); ?>

                                <div class="row">
                                    <div class="col-lg-10">


                                        <div class="form-group">
                                            <label>Title<code></code></label>
                                            <input type="text" name="title" class="form-control form-control-lg"
                                                value="<?php echo e($data->title); ?>">
                                        </div>



                                        <div class="form-group">
                                            <label>Short Description<code></code></label>
                                            <input type="text" name="short_description"
                                                class="form-control form-control-lg" value="<?php echo e($data->short_description); ?>">
                                        </div>

                                        <div class="form-group">
                                            <label>Description</label><br>

                                            <textarea name="ck_editor_text"><?php echo e($data->description); ?></textarea>
                                        </div>


                                        <div class="form-group">

                                            <div class="col-lg-6 detail__title">
                                                <div class="form-group">
                                                    <label for="file">Image</label>
                                                    <!-- <span class="required">*</span> -->
                                                    <input type="file" name="image"
                                                        class="form-control form-control-lg" />
                                                </div>
                                            </div>


                                        </div>

                                        <div class="form-group">
                                            <p for="file" class="font-weight-bold">Icon</p>
                                            <!-- <span class="required">*</span> -->
                                            <input type="file" name="icon" class="form-control form-control-lg" />
                                        </div>






                                    </div>


                                </div>

                                <div class="card-footer text-right">
                                    <button class="btn btn-primary mr-1" type="submit">Update</button>

                                </div>

                        </div>

                        <div class="col-lg-5">
                            <?php if($data->image != null): ?>
                                <div class="form-group p-4">
                                    <label for="exampleInputName1">Existing Service Page Image</label>

                                    <div class="custom-file">

                                        <img src="<?php echo e(asset('images/service/' . $data->image)); ?>" width="300"
                                            height="300" alt="user photo" style="padding-left: 0px;" /><br>


                                    </div>
                                </div>
                            <?php else: ?>
                                <div class="form-group p-4">
                                    <label for="exampleInputName1">Existing Service Page Image</label>
                                </div>
                            <?php endif; ?>
                        </div>
                        <div class="col-lg-5">
                            <?php if($data->icon != null): ?>
                                <div class="form-group p-4">
                                    <label for="exampleInputName1">Existing Icon</label>

                                    <div class="custom-file">

                                        <img src="<?php echo e(asset('images/service/' . $data->icon)); ?>" width="300"
                                            height="300" alt="user photo" style="padding-left: 0px;" /><br>


                                    </div>
                                </div>
                            <?php else: ?>
                                <div class="form-group p-4">
                                    <label for="exampleInputName1">Existing Icon</label>
                                </div>
                            <?php endif; ?>
                        </div>

                    </div>
                    </form>
                </div>
            </div>
    </div>
    </section>


    <!-- End -->
    </div>



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

<?php $__env->startSection('extra-js'); ?>
    <script type="text/javascript">
        function myFunction() {
            // Get the checkbox
            var checkBox = document.getElementById("main_menu");
            console.log(checkBox);
            if (checkBox.checked == true) {
                checkBox.value = 1;
            } else {
                checkBox.value = 0;
            }

        }

        function myFunction2() {
            // Get the checkbox
            var checkBox2 = document.getElementById("home_page");
            console.log(checkBox2);
            if (checkBox2.checked == true) {
                checkBox2.value = 1;
            } else {
                checkBox2.value = 0;
            }

        }
    </script>


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

<?php echo $__env->make('layouts.app_admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\xampp\htdocs\hats-off-moving\resources\views/services/edit.blade.php ENDPATH**/ ?>