Hi Ozan,
Having the same problem here. What was the solution?
I tried to make a custom pagination links view. So far i have got this:
<?php namespace App\Kurt;
use Illuminate\Pagination\BootstrapThreePresenter;
class CustomPaginationLinks extends BootstrapThreePresenter {
//<li><a href="#">«</a></li>
//<li><a href="#">1</a></li>
//<li><span>2</span></li>
//<li><a href="#">3</a></li>
//<li><a href="#">4</a></li>
//<li><a href="#">5</a></li>
//<li><a href="#">»</a></li>
public function getActivePageWrapper($text)
{
return '<li><span>'.$text.'</span></li>';
}
public function getDisabledTextWrapper($text)
{
return '<li class="disabled"><a href="#">'.$text.'</a></li>';
}
public function getPageLinkWrapper($url, $page, $rel = null)
{
return '<li><a href="'.$url.'">'.$page.'</a></li>';
}
public function render()
{
if ($this->hasPages())
{
return sprintf(
'%s %s %s',
$this->getPreviousButton(),
$this->getLinks(),
$this->getNextButton()
);
}
return '';
}
}
And here is my blade file:
<div class="row">
<div class="col-md-4 col-sm-4 items-info">Items 1 to 9 of 10 total</div>
<div class="col-md-8 col-sm-8">
<ul class="pagination pull-right">
{!! with(new App\Kurt\CustomPaginationLinks($products))->render() !!}
</ul>
</div>
</div>
It works exactly how i want with disabled and active links but fails at current page button (links).
Please or to participate in this conversation.