<?php if (isset($component)) { $__componentOriginalb9149c5834933a7cc028dc0044fe1532 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb9149c5834933a7cc028dc0044fe1532 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.backend.model','data' => ['id' => 'edit-model','class' => 'lg:max-w-2xl','button' => 'Submit','formId' => 'faq-edit','action' => route('faq.store'),'method' => __('post')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('backend.model'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('edit-model'),'class' => 'lg:max-w-2xl','button' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('Submit'),'form_id' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('faq-edit'),'action' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('faq.store')),'method' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('post'))]); ?>
    <?php echo csrf_field(); ?>
    <?php echo method_field('put'); ?>
    <div class="p-4 sm:p-10 overflow-y-auto  space-y-2">
        <?php if (isset($component)) { $__componentOriginale997ded79ddaf38dceb79598bb7493fb = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale997ded79ddaf38dceb79598bb7493fb = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.backend.input-label','data' => ['value' => 'Question','for' => 'question']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('backend.input-label'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('Question'),'for' => 'question']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale997ded79ddaf38dceb79598bb7493fb)): ?>
<?php $attributes = $__attributesOriginale997ded79ddaf38dceb79598bb7493fb; ?>
<?php unset($__attributesOriginale997ded79ddaf38dceb79598bb7493fb); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale997ded79ddaf38dceb79598bb7493fb)): ?>
<?php $component = $__componentOriginale997ded79ddaf38dceb79598bb7493fb; ?>
<?php unset($__componentOriginale997ded79ddaf38dceb79598bb7493fb); ?>
<?php endif; ?>
        <?php if (isset($component)) { $__componentOriginal520997795032a081472e524d174f39d0 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal520997795032a081472e524d174f39d0 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.backend.input-field','data' => ['type' => 'text','name' => 'question','id' => 'question','value' => old('question'),'placeholder' => 'Enter question']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('backend.input-field'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'text','name' => 'question','id' => 'question','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('question')),'placeholder' => 'Enter question']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal520997795032a081472e524d174f39d0)): ?>
<?php $attributes = $__attributesOriginal520997795032a081472e524d174f39d0; ?>
<?php unset($__attributesOriginal520997795032a081472e524d174f39d0); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal520997795032a081472e524d174f39d0)): ?>
<?php $component = $__componentOriginal520997795032a081472e524d174f39d0; ?>
<?php unset($__componentOriginal520997795032a081472e524d174f39d0); ?>
<?php endif; ?>

        <?php if (isset($component)) { $__componentOriginale997ded79ddaf38dceb79598bb7493fb = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale997ded79ddaf38dceb79598bb7493fb = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.backend.input-label','data' => ['value' => 'Answer','for' => 'ans']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('backend.input-label'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('Answer'),'for' => 'ans']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale997ded79ddaf38dceb79598bb7493fb)): ?>
<?php $attributes = $__attributesOriginale997ded79ddaf38dceb79598bb7493fb; ?>
<?php unset($__attributesOriginale997ded79ddaf38dceb79598bb7493fb); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale997ded79ddaf38dceb79598bb7493fb)): ?>
<?php $component = $__componentOriginale997ded79ddaf38dceb79598bb7493fb; ?>
<?php unset($__componentOriginale997ded79ddaf38dceb79598bb7493fb); ?>
<?php endif; ?>
        <?php if (isset($component)) { $__componentOriginal2448535d54dae428785bbd82aa2a39db = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal2448535d54dae428785bbd82aa2a39db = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.backend.input-textarea','data' => ['name' => 'ans','rows' => '4','id' => 'ans','text' => old('ans'),'placeholder' => 'Enter Answer']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('backend.input-textarea'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'ans','rows' => '4','id' => 'ans','text' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('ans')),'placeholder' => 'Enter Answer']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal2448535d54dae428785bbd82aa2a39db)): ?>
<?php $attributes = $__attributesOriginal2448535d54dae428785bbd82aa2a39db; ?>
<?php unset($__attributesOriginal2448535d54dae428785bbd82aa2a39db); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal2448535d54dae428785bbd82aa2a39db)): ?>
<?php $component = $__componentOriginal2448535d54dae428785bbd82aa2a39db; ?>
<?php unset($__componentOriginal2448535d54dae428785bbd82aa2a39db); ?>
<?php endif; ?>


    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb9149c5834933a7cc028dc0044fe1532)): ?>
<?php $attributes = $__attributesOriginalb9149c5834933a7cc028dc0044fe1532; ?>
<?php unset($__attributesOriginalb9149c5834933a7cc028dc0044fe1532); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb9149c5834933a7cc028dc0044fe1532)): ?>
<?php $component = $__componentOriginalb9149c5834933a7cc028dc0044fe1532; ?>
<?php unset($__componentOriginalb9149c5834933a7cc028dc0044fe1532); ?>
<?php endif; ?>


<script>
    $(document).on('click', '#update', function() {
        let data = $(this).attr('data');
        data = JSON.parse(data);
        $('#faq-edit').find('#question').val(data.question);
        $('#faq-edit').find('#ans').val(data.ans);

        let route = "<?php echo e(route('faq.update', ':id')); ?>".replace(':id', data.id);
        $('#faq-edit').attr('action', route)
    })
</script>
<?php /**PATH /home/khawajashipping/mrglogisticsbd.com/resources/views/backend/pages/faq/model/edit-model.blade.php ENDPATH**/ ?>