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



<form method="POST" action="<?php echo e(route('Product.store')); ?>" enctype="multipart/form-data">
    <?php echo csrf_field(); ?>
    <div class="card">
        <div class="card-header">        
            <div class="d-flex align-items-center">
                <div class="p-2  flex-fill bd-highlight">
                    <h4>Add New Products </h4>
                </div>            
            </div>  
        </div>
        <div class="card-body">
            <div class="row">           
                <div class="col-sm-6 form-group">
                    <label for="txtName">Product Name</label>
                    <input type="text" class="form-control <?php $__errorArgs = ['title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="title" id="txtName" required/>
                    <?php $__errorArgs = ['title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="invalid-feedback"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                </div>
                
                <div class="col-sm-3">
                    <img src="<?php echo e(asset('assets/images/imgicon.png')); ?>" alt="defualt"  width="100px" id="imgImage"/>
                    </div>
                <div class="col-sm-3 form-group">
                    <label for="fileIcon">Choose File</label>
                    <input type="file" class="form-control-file" name="image" id="fileIcon" onchange="
                    var input=this;
		                if (input.files && input.files[0]) {
                        var reader = new FileReader();
                        var size=(Math.round(input.files[0].size/1024));
                        if(size>1024)
                            {
                            alert('Please Upload file lesthan 1MB\nControl load time');
                            input.value='';
                            }
                        else{
                            reader.onload = function (e) {
                            $('#imgImage').attr('src', e.target.result); 
                            }
                            reader.readAsDataURL(input.files[0]);
                            }
				    }">
                </div>
                <div class="col-sm-6 form-group">
                    <label for="txtName">Narration</label>
                    <input type="text" class="form-control" name="narration" id="txtNarration"/>
                </div>
            </div>
        </div>
        <div class="card-footer">
            <div class="d-flex  justify-content-start p-2" style="width:50%;float:left;">
                <a class="btn btn-primary" href="<?php echo e(route('Product.index')); ?>"><i class="fas fa-arrow-left"></i> Back</a>
            </div>
            <div class="d-flex  justify-content-end p-2">
                <button type="reset" class="btn btn-secondary mr-2" name="btnSave">Clear</button>
                <button type="submit" class="btn btn-primary" name="btnSave">Save</button>
            </div>
        </div>
    </div>
</form>




    
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.adminapp', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\tailorapp\resources\views/Product/create.blade.php ENDPATH**/ ?>