I have a pagination in view but the problem is i have so many items that mans a big pagination like this
what i want is display 1 2 3 ... 6 7 for example i tried to do it but i didn't found any thing,
This is my action :
public function index()
{
// get all the logs
$logs = DB::table('services')
->join('logs', 'services.id', '=', 'logs.service_id')
->paginate(20);
// load the view and pass the logs
return View::make('logs.index',array('logs'=> $logs,'title'=>'Service Logs'));
}
This is my view :
<div class="container">
@foreach($logs as $key => $value)
<tr>
<td>{{ $value->domain }}</td>
<td>{{ $value->service_port }}</td>
<td>{{ $value->checktime }}</td>
<td class="text-center">
@if( $value->status == 'up' ) <img src="../img/up3.png" />
@elseif( $value->status == 'down' ) <img src="../img/down3.png" />
@else <img width="30" height="30" src="../img/warning_icon.png" />
@endif
</td>
<td>{{ $value->response_time }}</td>
</tr>
@endforeach
</div>
{{$logs->links();}}
So i tried everything to do that so please if someone has any idea i will be very appreciative
By default Laravel will use "sliding" page numbers, however, it requires a minimum of 13 pages before it will create the "sliding" page numbers. If you have less than 13 pages it will default to an ordinary range of pages.
Unfortunately this number is hard coded into Laravel.
See this comment (v4.1.24) in the Presenter
class that is responsible for building the pages.