

<?php $__env->startSection('title', 'CRUD con Laravel 10'); ?>

<?php $__env->startSection('content_header'); ?>
    <h1>Equipo de Trabajo</h1>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
   <a href="Teams/create" class="btn btn-primary mb-3">CREAR</a>

<table id="teams" class="table table-striped table-bordered shadow-lg mt-4" style="width:100%">
    <thead class="bg-primary text-white">
        <tr>
            <th scope="col">ID</th>
            <th scope="col">Código</th>
            <th scope="col">Nombre</th>
            <th scope="col">Apellido</th>
            <th scope="col">Profecion</th>
            <th scope="col">Imagen</th>

            <th scope="col">Acciones</th>
        </tr>
    </thead>
    <tbody>
        <?php $__currentLoopData = $teams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $team): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <tr>
            <td><?php echo e($team->id); ?></td>
            <td><?php echo e($team->codigo); ?></td>
            <td><?php echo e($team->nombre); ?></td>
            <td><?php echo e($team->apellido); ?></td>
            <td><?php echo e($team->trabajo); ?></td>
            <td>
                <img src="<?php echo e(asset($team->img)); ?>" style="width: 100px;">
            </td>
            <td>
                <form action="<?php echo e(route ('Teams.destroy',$team->id)); ?>" method="POST">
                <a href="/Teams/<?php echo e($team->id); ?>/edit" class="btn btn-info">Editar</a>
                <?php echo csrf_field(); ?>
                <?php echo method_field('DELETE'); ?>
                <button type="submit" class="btn btn-danger">Borrar</button>
                </form>
            </td>
        </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>
</table>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('css'); ?>
    <link rel="stylesheet" href="/css/admin_custom.css">
    <link href="https://cdn.datatables.net/1.10.22/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap5.min.js"></script>

<script>
$(document).ready(function() {
    $('#teams').DataTable({
        "lengthMenu": [[5,10, 50, -1], [5, 10, 50, "All"]]
    });
} );
</script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('adminlte::page', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\laravel10crudx\resources\views/Teams/index.blade.php ENDPATH**/ ?>