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

        $linkItems = '';

        foreach ($urls as $i => $url) {
            $pageNum = $i + 1;

            switch ($pageNum - $this->currentPage()) {
                case -1:
                    $linkItems .= "<link rel=\"prev\" href=\"{$url}\" />";
                    break;
                case 1:
                    $linkItems .= "<link rel=\"next\" href=\"{$url}\" />";
                    break;
            }
        }

        return $linkItems;
    }
public function renderRelLinks(LengthAwarePaginator $paginator, $full = false)
    {
        $urls = $this->allUrls($paginator, $full);

        $linkItems = '';

        foreach ($urls as $i => $url) {
            $pageNum = $i + 1;

            switch ($pageNum - $this->currentPage()) {
                case -1:
                    $linkItems .= "<link rel=\"prev\" href=\"{$url}\" />";
                    break;
                case 1:
                    $linkItems .= "<link rel=\"next\" href=\"{$url}\" />";
                    break;
            }
        }

        return $linkItems;
    }
public function renderRelLinks ( LengthAwarePaginator $ paginator , $ full = false ) { $ urls = $ this -> allUrls ( $ paginator , $ full ) ; $ linkItems = '' ; foreach ( $ urls as $ i => $ url ) { $ pageNum = $ i + 1 ; switch ( $ pageNum - $ this -> currentPage ( ) ) { case - 1 : $ linkItems .= "<link rel=\"prev\" href=\"{$url}\" />" ; break ; case 1 : $ linkItems .= "<link rel=\"next\" href=\"{$url}\" />" ; break ; } } return $ linkItems ; }
Render html link tags for SEO indication of previous and next page.

@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

@return string
Render html link tags for SEO indication of previous and next page .