<?php
namespace Illuminate\Pagination;
trait BootstrapThreeNextPreviousButtonRendererTrait
{
* Get the previous page pagination element.
*
* @param string $text
* @return string
*/
public function getPreviousButton($text = '«')
{
if ($this->paginator->currentPage() <= 1) {
return $this->getDisabledTextWrapper($text);
}
$url = $this->paginator->url(
$this->paginator->currentPage() - 1
);
return $this->getPageLinkWrapper($url, $text, 'prev');
}
* Get the next page pagination element.
*
* @param string $text
* @return string
*/
public function getNextButton($text = '»')
{
if (! $this->paginator->hasMorePages()) {
return $this->getDisabledTextWrapper($text);
}
$url = $this->paginator->url($this->paginator->currentPage() + 1);
return $this->getPageLinkWrapper($url, $text, 'next');
}
}