php - laravel 5.4 how to get intelligent pagination - with Ajax -
i have following blade temlpate showing records
i want pagination first show 10 , show ... when click on next start showing 2 11 intelligent pagination, can me out here
my blade template:
<!-- pagination start--> <div id="pagination"> <div class="container"> <div class="bt-pagination-main"> <div class="bt-pagination-show"> <span class="page-show">show</span> <span class="page-show-number"> {{form::select('show_per_page', array('10' => '10' ,'25' => '25' ,'50' => '50','100' => '100','200' => '200') , session::get('user_config.show_record'), array( 'class' =>'selectpicker', 'tabindex' =>'7', 'style'=>'width:58px;', 'data-placeholder'=>'10', 'id'=>'show_per_page') )}} </span> </div> <div class="bt-pagination-number"> <ul class="bt-pagination"> @if($total_pages > 0) @if($page > 1) <li><a href="javascript:void(0)" class="page-cls prev" value="">prev</a></li> @endif @if($total_pages > 1) @for($i = 1; $i < $total_pages; $i++) <li><a href="javascript:void(0)" @if($i === $page) class="page-cls active" @else class="page-cls" @endif>{{$i}}</a></li> @endfor {{--@else--}} {{--<li><a href="javascript:void(0)" class="page-cls active">1</a></li>--}} @endif @if($total_pages > 5) <li>...</li> @endif <li><a href="javascript:void(0)" @if($total_pages === $page) class="page-cls active" @else class="page-cls" @endif>{{$total_pages}}</a></li> @if($page < $total_pages) <li><a href="javascript:void(0)" class="page-cls next">next</a></li> @endif @endif </ul> </div> </div> </div> </div> <!-- pagination end -->
Comments
Post a Comment