44 lines
1.4 KiB
PHP
44 lines
1.4 KiB
PHP
@use(App\Models\User)
|
|
|
|
<div>
|
|
<div class="flex flex-col sm:flex-row gap-2 justify-between items-baseline mb-4">
|
|
<x-title>Usuarios</x-title>
|
|
|
|
@can('create', User::class)
|
|
<button class="btn" href="{{route('usuarios.create')}}" wire:navigate>
|
|
<i class="ti ti-plus text-lg"></i>
|
|
Registrar Usuario
|
|
</button>
|
|
@endcan
|
|
</div>
|
|
|
|
|
|
<div class="overflox-x-auto">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Nombre</th>
|
|
<th>Email</th>
|
|
<th class="text-end">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($this->rows as $row)
|
|
<tr>
|
|
<td>{{$row->name}}</td>
|
|
<td>{{$row->email}}</td>
|
|
<td class="w-0 whitespace-nowrap">
|
|
<a class="btn btn-circle btn-sm" wire:navigate href="{{route('usuarios.edit', $row->id)}}">
|
|
<i class="ti ti-edit"></i>
|
|
</a>
|
|
<button class="btn btn-circle btn-error btn-sm" wire:click="confirmDelete('{{$row->id}}')">
|
|
<i class="ti ti-trash"></i>
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|