Se reparo error de paginacion

This commit is contained in:
Guillermo Gutierrez
2024-05-02 20:24:12 -07:00
parent 7b9ec7d798
commit e046dd395f
2 changed files with 8 additions and 5 deletions

View File

@@ -5,10 +5,12 @@ namespace App\Http\Livewire;
use App\Models\User; use App\Models\User;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
use Livewire\Component; use Livewire\Component;
use Livewire\WithPagination;
use Spatie\Permission\Models\Role; use Spatie\Permission\Models\Role;
class UserController extends Component class UserController extends Component
{ {
use WithPagination;
public $buscador = '', $modal = false; public $buscador = '', $modal = false;
public $user, $role_id, $password; public $user, $role_id, $password;

View File

@@ -54,15 +54,16 @@
</th> </th>
</tr> </tr>
@empty @empty
</tbody> {{$users->links()}}
</table>
<div class="alert alert-info my-4 max-w-3xl mx-auto"> <div class="alert alert-info my-4 max-w-3xl mx-auto">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<span>No hay usuarios registradas en el sistema.</span> <span>No hay usuarios registradas en el sistema.</span>
</div> </div>
@endforelse @endforelse
</tbody>
</table>
{{$users->links()}}
</div> </div>
</div> </div>
</div> </div>
</div> </div>