KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/easysfm.edukrypt.in/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/easysfm.edukrypt.in/storage/framework/views/b6ed3de561d5efef912d93b2357b21a67f1a7bb6.php
<?php $__env->startSection('content'); ?>



    <!-- begin::main content -->

    <main class="main-content">

        <div class="container">

            <!-- begin::page header -->
            <div class="page-header">
                <h3>Edit Product</h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="#">Dashboard</a></li>
                        <li class="breadcrumb-item"><a href="<?php echo e(asset('admin/product-list')); ?>">Product List</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Edit Product</li>
                    </ol>
                </nav>
            </div>
            <!-- end::page header -->
            <?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>

            <div class="row">
                <div class="col-md-12">

                    <div class="card">
                        <div class="card-header">
                            <h5 class="card-title pull-left m-t-10">Edit Product</h5>
                            <a href="<?php echo e(asset('admin/product-list')); ?>" class="btn btn-primary pull-right text-white"><i
                                    class="fa fa-list"></i>&nbsp; Product List</a>
                        </div>

                        <div class="card-body">
                            <form action="<?php echo e(asset('admin/edit-product/' . Request::segment(3))); ?>" method="post"
                                enctype="multipart/form-data">
                                <?php echo csrf_field(); ?>
                                <div class="form-group">
                                    <label for="category">Category <span class="error">*</span></label>
                                    <select style="width: 300px;" class="js-example-basic-single category" name="category"
                                        id="category">
                                        <option value="">Select Category</option>
                                        <?php if(!empty($categories)): ?>
                                            <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option <?php echo $product->cat_id == $category->id ? 'selected' : ''; ?> value="<?php echo e($category->id); ?>">
                                                    <?php echo e($category->name); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php endif; ?>
                                    </select>

                                    <?php if($errors->has('category')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('category')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>

                                <div class="form-group">
                                    <label for="username">Product Name</label>
                                    <input style="width: 300px;" type="text" class="form-control" name="name"
                                        value="<?php echo e($product->name); ?>" id="name" placeholder="Enter Product Name">
                                    <?php if($errors->has('pname')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('pname')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>

                                <div class="form-group">
                                    <label for="institute">Type</label>
                                    <select style="width: 300px;" class="js-example-basic-single" name="type">
                                        <option>Select Type</option>
                                        <option value="course" <?php echo e($product->type == 'course' ? 'selected' : ''); ?>>Course
                                        </option>
                                        <option value="testseries" <?php echo e($product->type == 'testseries' ? 'selected' : ''); ?>>
                                            Testseries</option>
                                        <option value="book" <?php echo e($product->type == 'book' ? 'selected' : ''); ?>>Book
                                        </option>
                                    </select>

                                    <?php if($errors->has('type')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('type')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>


                                <div class="form-group">
                                    <label for="email">Short Description</label>
                                    <textarea name="short_desc" placeholder="Enter Short desc.." class="form-control" id="" cols="30"
                                        rows="10"><?php echo e($product->short_desc); ?></textarea>

                                    <?php if($errors->has('short_desc')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('short_desc')); ?>

                                        </div>
                                    <?php endif; ?>

                                </div>

                                <div class="form-group">
                                    <label for="email">Description</label>
                                    <textarea name="description" placeholder="Enter Short desc.." class="form-control" id="" cols="30"
                                        rows="10"><?php echo e($product->description); ?></textarea>

                                    <?php if($errors->has('description')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('description')); ?>

                                        </div>
                                    <?php endif; ?>

                                </div>


                                




                                <div class="form-group">
                                    <label for="institute">Features</label>
                                    <input style="width: 300px;" type="text" class="form-control" name="features"
                                        value="<?php echo e($product->features); ?>" id="features" placeholder="Enter Features">
                                    <?php if($errors->has('features')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('features')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>

                                <div class="form-group">
                                    <label for="institute">Author</label>

                                    
                                    

                                    <select class="js-example-basic-single category" name="teacher_id" id="teacher_id">
                                        <option value="">Select Author</option>
                                        <?php if(!empty($teachers)): ?>
                                            <?php $__currentLoopData = $teachers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $teacher): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($teacher->id); ?>"
                                                    <?php echo e($teacher->id == $product->teacher_id ? 'selected' : ''); ?>>
                                                    <?php echo $teacher->username; ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php endif; ?>
                                    </select>
                                    <?php if($errors->has('teacher_id')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('teacher_id')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>


                                <div class="form-group">
                                    <label for="institute">Sort Order</label>
                                    <input style="width: 300px;" type="number" class="form-control" name="sort_order"
                                        value="<?php echo e($product->sort_order); ?>" id="sort_order" placeholder="Enter Sort Order">
                                    <?php if($errors->has('sort_order')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('sort_order')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>

                                <div class="form-group">
                                    <label for="institute">Slug</label>
                                    <input style="width: 300px;" type="text" class="form-control" name="slug"
                                        value="<?php echo e($product->slug); ?>" id="slug" placeholder="Enter slug">
                                    <?php if($errors->has('slug')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('slug')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>

                                <div class="form-group">
                                    <label for="image">Image</label>
                                    <div class="custom-file">
                                        <input type="file" class="custom-file-input" name="image" id="customFile">
                                        <label class="custom-file-label" for="customFile">Choose file</label>
                                        <hr>
                                        <img src="<?php echo e(asset('public/uploads/products/' . $product->image)); ?>"
                                            style="width: 50px;height:50px;">
                                        <?php if($errors->has('image')): ?>
                                            <div class="error">
                                                <?php echo e($errors->first('image')); ?>

                                            </div>
                                        <?php endif; ?>
                                    </div>
                                </div>

                                <br>
                                <div class="form-group">
                                    <label for="institute">Status</label>
                                    <select class="js-example-basic-single" name="status">
                                        <option value="1" <?php echo e($product->status == '1' ? 'selected' : ''); ?>>Active
                                        </option>
                                        <option value="0" <?php echo e($product->status == '0' ? 'selected' : ''); ?>>Inactive
                                        </option>

                                    </select>

                                    <?php if($errors->has('status')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('status')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>


                                <button type="submit" class="btn btn-primary">Submit</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
    <!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
    <!-- begin::select2 -->
    <link rel="stylesheet" href="<?php echo e(asset('public/admin/vendors/select2/css/select2.min.css')); ?>" type="text/css">
    <!-- end::select2 -->
    <script src="<?php echo e(asset('public/admin/vendors/select2/js/select2.min.js')); ?>"></script>
    <script src="<?php echo e(asset('public/admin/js/examples/select2.js')); ?>"></script>
    <!-- end::select2 -->

    <script src="https://cdn.tiny.cloud/1/hau95x3ztvsrdr65m4zb9kd3e3l24vbxynk72xtkh84z3rol/tinymce/5/tinymce.min.js"
        referrerpolicy="origin"></script>
    <script type="text/javascript">
        tinymce.init({
            //paste_data_images: true,
            plugins: [
                "autolink lists link image charmap print preview hr anchor imagetools pagebreak",
                "searchreplace wordcount visualblocks visualchars code fullscreen",
                "insertdatetime media nonbreaking save table directionality",
                "emoticons template paste textcolor colorpicker textpattern"
            ],
            toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
            content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }',
            height: 300,
            menubar: false,
            selector: 'textarea',
            images_upload_handler: function(blobInfo, success, failure) {
                var xhr, formData;
                xhr = new XMLHttpRequest();
                xhr.withCredentials = false;
                xhr.open('POST', "<?php echo e(asset('upload')); ?>");
                var token = $('meta[name="csrf-token"]').attr('content');
                xhr.setRequestHeader("X-CSRF-Token", token);
                xhr.onload = function() {
                    var json;
                    if (xhr.status != 200) {
                        failure('HTTP Error: ' + xhr.status);
                        return;
                    }
                    json = JSON.parse(xhr.responseText);

                    if (!json || typeof json.location != 'string') {
                        failure('Invalid JSON: ' + xhr.responseText);
                        return;
                    }
                    success(json.location);
                };
                formData = new FormData();
                formData.append('file', blobInfo.blob(), blobInfo.filename());
                xhr.send(formData);
            },
            file_picker_callback: function(cb, value, meta) {
                var input = document.createElement('input');
                input.setAttribute('type', 'file');
                input.setAttribute('accept', 'image/*');
                input.onchange = function() {
                    var file = this.files[0];
                    var id = 'blobid' + (new Date()).getTime();
                    var blobCache = tinymce.activeEditor.editorUpload.blobCache;
                    var blobInfo = blobCache.create(id, file);
                    blobCache.add(blobInfo);
                    cb(blobInfo.blobUri(), {
                        title: file.name
                    });
                };
                input.click();
            }
        });
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('admin.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/easysfm.edukrypt.in/resources/views/admin/product/edit-product.blade.php ENDPATH**/ ?>

Anon7 - 2021