<div id="lzr">
  <div class="row">
    <div class="col-md-12">
        <input type="text" id="inputBlz" onkeyup="myFunctionlz()" class="form-control buscadores" placeholder="Buscar por folio.." title="Type in a name">
    </div>
  </div>
  <div class="table-responsive">
    <table class="table mt-3" id="tablelz">
        <thead>
            <tr><th class="text-center titulo-tabla-color" colspan="7" colspan="8">RECTIFICACIONES LÁZARO CÁRDENAS</th></tr>

            <tr>
              <th class="columna">Editar</th>
              <th class="columna">Detalles</th>
              <th class="columna">Folio</th>
              <th class="columna">Pedimento</th>
              <th class="columna">Fecha de rectificación</th>
              <th class="columna">Rectifico</th>
              <th class="columna">Cargo a:</th>
            </tr>
        </thead>
        @foreach ($LZ as $item)
            <tr>
                @if ($item->pedimento == "0003000")
                    <td><button disabled data-toggle="modal" data-target="#editarRECLZ{{$item->id}}" class="btn btn-primary btn-sm"><i class="icon-pencil"></i></button></td>
                    <td><button disabled data-toggle="modal" data-target="#detallesRecLZ{{$item->id}}" class="btn btn-info btn-sm"><i class="icon-th-small-outline"></i></button></td>
                @else
                    <td><button data-toggle="modal" data-target="#editarRECLZ{{$item->id}}" class="btn btn-primary btn-sm"><i class="icon-pencil"></i></button></td>
                    <td><button data-toggle="modal" data-target="#detallesRecLZ{{$item->id}}" class="btn btn-info btn-sm"><i class="icon-th-small-outline"></i></button></td>
                @endif
                <td>{{$item->folio}}</td>
                <td>{{$item->pedimento}}</td>
                <td>{{$item->fecha_modificacion}}</td>
                <td>{{$item->usuario}}</td>
                <td>{{$item->cargo}}</td>
            </tr>
        @endforeach
        
    </table>
  </div>
</div>

<script>
    function myFunctionlz() {
      var input, filter, table, tr, td, i, txtValue;
      input = document.getElementById("inputBlz");
      filter = input.value.toUpperCase();
      table = document.getElementById("tablelz");
      tr = table.getElementsByTagName("tr");
      for (i = 0; i < tr.length; i++) {
        td = tr[i].getElementsByTagName("td")[2];
        if (td) {
          txtValue = td.textContent || td.innerText;
          if (txtValue.toUpperCase().indexOf(filter) > -1) {
            tr[i].style.display = "";
          } else {
            tr[i].style.display = "none";
          }
        }       
      }
    }
</script>