<form v-on:submit.prevent="guardarProveedor" accept-charset="UTF-8" enctype="multipart/form-data">
    <div class="modal fade" id="crear-proveedor">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Nuevo Proveedor</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-lg-6">
                            <div class="form-group">
                                <label for="nombre">Nombre</label>
                                <input v-model="proveedor.nombre" name="nombre" type="text" class="form-control">
                            </div>
                            <div class="form-group">
                                <label for="direccion">Dirección</label>
                                <input v-model="proveedor.direccion" name="direccion" type="text" class="form-control">
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group">
                                <label for="direccion">Logo</label>

                                <div v-if="proveedor.logo != ''" style="border: 1px solid #ced4da; position: relative;" class="rounded mb-4">
                                    <button v-on:click="borrarImagen" type="button" class="close" style="position: absolute; right: 20px; top: 15px;">
                                        <span aria-hidden="true">&times;</span>
                                    </button>
                                    <img :src="proveedor.logo" class="my-2" alt="" width="100%">
                                </div>
        
                                <div class="input-group">
                                    <div class="custom-file">
                                        <input v-on:change="cargarImagen" ref="logoFile" type="file" class="custom-file-input" id="inputGroupFile03" aria-describedby="inputGroupFileAddon03">
                                        <label class="custom-file-label" for="inputGroupFile03" data-browse="Buscar"></label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    

                    

                    <div>
                        <ul>
                            <li v-for="error in errors" class="text-danger">{{ error }}</li>
                        </ul>
                    </div>
                </div>
                <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Cerrar</button>
                        <input type="submit" class="btn btn-primary" value="Guardar">
                </div>
            </div>
        </div>
    </div>
</form>

<?php /**PATH C:\xampp\htdocs\costear\resources\views/proveedores/create.blade.php ENDPATH**/ ?>