File: /var/www/html/xfacil.desafio.com.py/resources/views/livewire/popup/index.blade.php
<div>
<div class="row">
<div class="col-12">
@include('livewire.popup.form')<hr>
<div class="card">
<div class="card-header">
<div class="col-12">
<div class="form-group">
<input wire:model.live="search" type="search" class="form-control" placeholder="Buscar" />
</div>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="tabla" class="table table-bordered table-striped">
<thead>
<tr>
<th>Titulo</th>
<th>Tipo</th>
<th>Opciones</th>
</tr>
</thead>
<tbody>
@foreach($modales as $modal)
<tr>
<td>{{ $modal->nombre }}</td>
<td>{{ $modal->tipo }}</td>
<td>
<button type="button" class="btn btn-success btn-sm" data-toggle="modal" data-target="#viewModal{{$modal->id}}">
<i class="fas fa-eye"></i>
</button>
<button
type="button"
class="btn btn-danger btn-sm"
data-toggle="modal"
data-target="#deleteModal{{$modal->id}}">
<i class="fas fa-trash"></i>
</button>
@include('livewire.popup.modal')
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="col-12">
@if($modales->count())
{{ $modales->links() }}
@else
No hay resultados para la búsqueda "{{ $search }}"
@endif
</div>
</div>
@section('js')
<script>
window.addEventListener('alert', event => {
toastr[event.detail.type](event.detail.message);
});
</script>
@stop
</div>