laravel-seo icon indicating copy to clipboard operation
laravel-seo copied to clipboard

SEO Pagination Meta Tags rel="next" / rel="prev"

Open mauricekindermann opened this issue 9 months ago • 5 comments

As far as I can see this package doesn't handle pagination SEO tags? I had to publish my pagination views to make them pretty, so for now I've just added them this way.

But if there is a nicer solution let me know.. Otherwise I can look to do a PR in the future.

@pushOnce('head.end')
    @if ($paginator->hasPages())

        @if (!$paginator->onFirstPage())
            <link rel="prev" href="{{ $paginator->previousPageUrl() }}">
        @endif

        @if ($paginator->hasMorePages())
            <link rel="next" href="{{ $paginator->nextPageUrl() }}">
        @endif

    @endif
@endPushOnce

mauricekindermann avatar May 21 '24 08:05 mauricekindermann