use Illuminate\Pagination\Paginator;
php artisan vendor:publish --tag=laravel-pagination
<div class="card-footer clearfix"> {{ $users->onEachSide(1)->links('vendor.pagination.bootstrap-4') }} </div>
$user->appends([ 'sort' => $_GET['sort'], 'desc' => $_GET['desc'] ]);
<thead> <tr> <th style="width: 10px"> <a href="{{ url('/users') }}?sort=id<?php if(isset($_GET['sort']) AND ($_GET['sort']=='id')){ if($_GET['desc']==0){echo('&desc=1');} else {echo('&desc=0');} } else {echo('&desc=0');} ?>">#</a> </th> <th> <a href="{{ url('/users') }}?sort=name<?php if(isset($_GET['sort']) AND ($_GET['sort']=='name')){ if($_GET['desc']==0){echo('&desc=1');} else {echo('&desc=0');} } else {echo('&desc=0');} ?>">Nombre</a> </th> <th><a href="{{ url('/users') }}?sort=email<?php if(isset($_GET['sort']) AND ($_GET['sort']=='email')){ if($_GET['desc']==0){echo('&desc=1');} else {echo('&desc=0');} } else {echo('&desc=0');} ?>">Email</a></th> <th><a href="{{ url('/users') }}?sort=password<?php if(isset($_GET['sort']) AND ($_GET['sort']=='password')){ if($_GET['desc']==0){echo('&desc=1');} else {echo('&desc=0');} } else {echo('&desc=0');} ?>">Password</a></th> </tr> </thead>
Por favor, Identificarse o Crear cuenta para unirse a la conversación.