<?php $__env->startSection('content'); ?>
    <div class="container mt-3" style="max-width:100%;min-height:100%;">
        <div class="table-wrapper ">
            <div class="table-title">
                <form action="<?php echo e(route('clientes.update', $cliente->id)); ?>" method="POST">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('PUT'); ?>
                    <div class="row mb-3">
                        <div class="col d-flex justify-content-center">
                            <h2>Editar Cliente</b></h2>
                        </div>
                    </div>

                    <?php if($errors->any()): ?>
                        <div class="alert alert-danger">
                            <ul>
                                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li><?php echo e($error); ?></li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>
                    <?php endif; ?>

                    <div class="row mt-2">
                        <div class="col-md-6">
                            <label>Nome</label>
                            <input type="text" name="nome" value="<?php echo e($cliente->nome); ?>" class="form-control">
                        </div>

                        <div class="col-md-6">
                            <label>Telefone</label>
                            <input type="text" name="telephone" id="telephone1" value="<?php echo e($cliente->telephone); ?>"
                                class="form-control">
                        </div>
                    </div>

                    <button class="button btn-block btn-sm btn-success mt-3">Salvar</button>
                </form>
            </div>
        </div>
    </div>

    <script>
        document.getElementById('telephone1').addEventListener('input', function(e) {
            var aux = e.target.value.replace(/\D/g, '').match(/(\d{0,2})(\d{0,5})(\d{0,4})/);
            e.target.value = !aux[2] ? aux[1] : '(' + aux[1] + ') ' + aux[2] + (aux[3] ? '-' + aux[3] : '');
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home3/facils98/rifa4.facilscript.com/resources/views/clientes/editar.blade.php ENDPATH**/ ?>