Add this functions to SemanticUiPresenter class. I use FontAwesome to display the prev/next arrow.
public function getPrevious($text = '<i class="fa fa-arrow-left"></i>')
{
if ($this->currentPage <= 1)
{
return $this->getDisabledTextWrapper($text);
}
$url = $this->paginator->getUrl($this->currentPage - 1);
return $this->getPageLinkWrapper($url, $text, 'prev');
}
public function getNext($text = '<i class="fa fa-arrow-right"></i>')
{
if ($this->currentPage >= $this->lastPage)
{
return $this->getDisabledTextWrapper($text);
}
$url = $this->paginator->getUrl($this->currentPage + 1);
return $this->getPageLinkWrapper($url, $text, 'next');
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community