Download the PHP package wnikk/smart-pagination without Composer

On this page you can find all versions of the php package wnikk/smart-pagination. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package smart-pagination

Smart Pagination for Laravel

SmartPagination is a Laravel Blade component that simplifies pagination rendering and adds support for reverse pagination (descending page numbers). It’s designed to be flexible, SEO-friendly, and easy to customize.

Designed for blogs, news feeds, and any content that grows over time.

Features


🌐 SEO-Friendly Pagination with Custom URL Patterns

SmartPagination allows you to generate clean, customizable, and SEO-optimized pagination URLs for your applications. Instead of relying on default query parameters like ?page=2, you can define your own URL patterns such as /blog/page-2, /news-p3.html, or even /archive-4y.html.

✅ Why It Matters for SEO

Search engines prefer stable, predictable URLs. When paginated content (like blog posts, product listings, or news articles) grows over time, traditional pagination can cause older content to shift across pages — which may lead to:

With reverse pagination and custom URL patterns, you can ensure that:

This improves crawl efficiency and preserves ranking signals for evergreen content.

🔧 Examples of Custom Patterns

You can define your own pagePattern using {page} as a placeholder:

Pattern Resulting URL (Page 2)
page-{page} /blog/page-2
news-p{page}.html /news/news-p2.html
archive-{page}y /archive-2y

🔁 Reverse Pagination: Keep Your URLs Stable as Content Grows

Reverse pagination is a powerful feature that ensures your newest content always appears on the first page, while older content stays anchored to its original URLs. This is especially useful for blogs, news feeds, changelogs, or any time-sensitive content.

With reverse pagination, the first page always shows the latest items, and older pages remain unchanged — making your site more SEO-friendly.

🔧 Examples of Reverse Pagination

You have 100 articles, sorted by newest first (DESC), showing 10 per page.

🔴 With Reverse Pagination Disabled

Display Page Real Page Articles Shown
/news (page 1) page 1 91–100 (newest)
/news/page-2 page 2 81–90
... ... ...
/news/page-10 page 10 1–10 (oldest)

Tomorrow you publish 10 more articles (total: 110):

Display Page Real Page Articles Shown
/news (page 1) page 1 101–110 (newest)
/news/page-2 page 2 91–100
... ... ...
/news/page-11 page 11 1–10 (still oldest)

✅ With Reverse Pagination Enabled

Display Page Real Page Articles Shown
/news (page 10) page 1 91–100 (newest)
/news/page-9 page 2 81–90 always on page-9
... ... ...
/news/page-1 page 10 1–10 (oldest) always on page-1

Result:


Installation

Install via Composer:

Usage

For basic usage, you can use the smartPaginate method on your Eloquent model. This method will automatically handle pagination with the latest items first and generate reverse pagination links.

For example, if you have a Post model and want to paginate the latest posts on controller:

In your Blade view (by default):

Or your Blade custom view full version of params (SEO-friendly):

Publish Configuration (optional)

Publish Configuration

Publish Blade Views

License

MIT


All versions of smart-pagination with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wnikk/smart-pagination contains the following files

Loading the files please wait ...