src/PaginateRoute.php
public function renderPageList(LengthAwarePaginator $paginator, $full = false, $class = null, $additionalLinks = false)
    {
        $urls = $this->allUrls($paginator, $full);

        if ($class) {
            $class = " class=\"$class\"";
        }

        $listItems = "<ul{$class}>";

        if ($this->hasPreviousPage() && $additionalLinks) {
            $listItems .= "<li><a href=\"{$this->previousPageUrl()}\">&laquo;</a></li>";
        }

        foreach ($urls as $i => $url) {
            $pageNum = $i;
            $css = '';

            $link = "<a href=\"{$url}\">{$pageNum}</a>";
            if ($pageNum == $this->currentPage()) {
                $css = ' class="active"';
                $link = $pageNum;
            }

            $listItems .= "<li{$css}>$link</li>";
        }

        if ($this->hasNextPage($paginator) && $additionalLinks) {
            $listItems .= "<li><a href=\"{$this->nextPageUrl($paginator)}\">&raquo;</a></li>";
        }

        $listItems .= '</ul>';

        return $listItems;
    }
public function renderPageList(LengthAwarePaginator $paginator, $full = false, $class = null, $additionalLinks = false)
    {
        $urls = $this->allUrls($paginator, $full);

        if ($class) {
            $class = " class=\"$class\"";
        }

        $listItems = "<ul{$class}>";

        if ($this->hasPreviousPage() && $additionalLinks) {
            $listItems .= "<li><a href=\"{$this->previousPageUrl()}\">&laquo;</a></li>";
        }

        foreach ($urls as $i => $url) {
            $pageNum = $i;
            $css = '';

            $link = "<a href=\"{$url}\">{$pageNum}</a>";
            if ($pageNum == $this->currentPage()) {
                $css = ' class="active"';
                $link = $pageNum;
            }

            $listItems .= "<li{$css}>$link</li>";
        }

        if ($this->hasNextPage($paginator) && $additionalLinks) {
            $listItems .= "<li><a href=\"{$this->nextPageUrl($paginator)}\">&raquo;</a></li>";
        }

        $listItems .= '</ul>';

        return $listItems;
    }
public function renderPageList ( LengthAwarePaginator $ paginator , $ full = false , $ class = null , $ additionalLinks = false ) { $ urls = $ this -> allUrls ( $ paginator , $ full ) ; if ( $ class ) { $ class = " class=\"$class\"" ; } $ listItems = "<ul{$class}>" ; if ( $ this -> hasPreviousPage ( ) && $ additionalLinks ) { $ listItems .= "<li><a href=\"{$this->previousPageUrl()}\">&laquo;</a></li>" ; } foreach ( $ urls as $ i => $ url ) { $ pageNum = $ i ; $ css = '' ; $ link = "<a href=\"{$url}\">{$pageNum}</a>" ; if ( $ pageNum == $ this -> currentPage ( ) ) { $ css = ' class="active"' ; $ link = $ pageNum ; } $ listItems .= "<li{$css}>$link</li>" ; } if ( $ this -> hasNextPage ( $ paginator ) && $ additionalLinks ) { $ listItems .= "<li><a href=\"{$this->nextPageUrl($paginator)}\">&raquo;</a></li>" ; } $ listItems .= '</ul>' ; return $ listItems ; }
Render a plain html list with previous, next and all urls. The current page gets a current class on the list item.

@param \Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator
@param bool                                                  $full              Return the full version of the URL in for the first page
Ex. /users/page/1 instead of /users
@param string                                                $class             Include class on pagination list
Ex. <ul class="pagination">
@param bool                                                  $additionalLinks   Include prev and next links on pagination list

@return string
Render a plain html list with previous next and all urls . The current page gets a current class on the list item .