
<?php $__env->startSection('container'); ?>
    <div class="row">
        <!-- left column -->
        <div class="col-md-12">
            <!-- jquery validation -->
            <?php if(session()->has('error')): ?>
                <div class="alert alert-danger text-center">
                    <?php echo e(session()->get('error')); ?>

                </div>
            <?php endif; ?>
            <?php if(session()->has('success')): ?>
                <div class="alert alert-success text-center">
                    <?php echo e(session()->get('success')); ?>

                </div>
            <?php endif; ?>
            <div class="card card-primary">
                <div class="card-header">
                    <h3 class="card-title">เพิ่มข้อมูลโลโก้ลูกค้า</h3>
                </div>
                <!-- /.card-header -->
                <!-- form start -->
                <form action="<?php echo e(route('logo.store')); ?>" method="post" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="card-body">
                        <div class="form-group">
                            <label for="exampleInputEmail1">ชื่อบริษัท <small class="text-danger">*</small></label>
                            <input type="text" name="company_name" class="form-control" id="company_name" placeholder="ชื่อบริษัท"
                                value="<?php echo e(old('company_name')); ?>">
                            <small class="text-danger"><?php echo e($errors->first('company_name')); ?></small>
                        </div>
                        <div class="form-group">
                            <label for="exampleInputEmail1">รูปภาพ <small class="text-danger">*</small></label>
                            <input class="form-control" type="file" id="files" name="files">
                            <small class="text-danger"><?php echo e($errors->first('files')); ?></small>
                            <span id="imgshow"></span>
                        </div>
                    </div>
                    <!-- /.card-body -->
                    <div class="card-footer text-center">
                        <button type="submit" class="btn btn-success">เพิ่มข้อมูล</button>
                    </div>
                </form>
            </div>
            <!-- /.card -->
        </div>
        <!--/.col (left) -->

    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scriptadd'); ?>    
<script>
    $('document').ready(function() {
        $("#files").change(function() {
            if (this.files && this.files[0]) {
                var reader = new FileReader();
                reader.onload = function(e) {
                    $("#imgshow").html('<img src="'+e.target.result+'" align="left">')
                }
                reader.readAsDataURL(this.files[0]);
            }
        });
    });
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Mos\Desktop\tik\resources\views/admin/form/logo/logos.blade.php ENDPATH**/ ?>