Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pager Laravel Package

maalls/pager

maalls/pager is a PHP pagination helper for Laravel that turns long query results into navigable pages. It provides pager utilities and Blade-friendly page links so you can add previous/next controls and page numbers to lists and search results with minimal setup.

Deep Wiki
Context7

maalls/pager is a lightweight pagination helper for Laravel applications, giving you a small Pager abstraction for building page navigation without pulling in a full paginator. It focuses on computing page ranges, detecting the current page, and generating the links needed to move forwards, backwards, or jump to a specific page.

  • Simple page and offset calculations for any dataset
  • Preserves existing query strings when building links
  • Renders navigation through Blade views or your own templates
  • Configurable page size and visible link window
  • Framework-agnostic helpers for use outside Laravel
Frequently asked questions about Pager
How do I install maalls/pager in a Laravel project?
Install the package with Composer using composer require maalls/pager. If the package includes a Laravel service provider, package discovery should register it automatically; otherwise add it manually as described in the package documentation. Check the repository README for any publishable configuration or view files.
Does maalls/pager support Laravel 10 or Laravel 11?
The provided package context does not list supported Laravel versions, so verify compatibility in the package composer.json or README before upgrading. Because it is described as a lightweight utility for Laravel and PHP projects, it may work across versions, but you should test it on your target framework.
What is the difference between maalls/pager and Laravel's built-in paginator?
Laravel's paginator is tightly integrated with Eloquent and the query builder, while maalls/pager is described as a lightweight utility for calculating offsets, total pages, and result windows and rendering simple navigation links. It may suit long lists, logs, or query results where you do not want a heavier dependency. Use Laravel's paginator when you need framework-native query integration.
How is maalls/pager related to Doctrine's Paginator?
The package overview describes it as an extension of the Doctrine Paginator adapted for web use. That suggests it borrows pagination concepts from Doctrine while providing web-oriented helpers. It is not necessarily a drop-in Doctrine replacement, so review the API before using it with Doctrine entities.
Can maalls/pager calculate page offsets and total pages?
Yes, the package is described as helping calculate page offsets, total pages, and result windows. These calculations are useful when building custom pagination for logs, long lists, or raw query results. Consult the package documentation for exact method names and argument order.
Can I use maalls/pager outside Laravel in plain PHP?
The description says it is a lightweight pagination utility for Laravel and PHP projects, so plain PHP use is plausible. However, Laravel-specific integrations such as service providers or Blade views may not be available outside Laravel. Test the core calculation and rendering helpers in your PHP environment.
How do I render pagination navigation links with maalls/pager?
The package is described as rendering simple navigation links for long lists, logs, or query results. The exact rendering method and any view or template requirements are not included in the provided context, so check the README for usage examples. You may need to pass values such as the current page, total pages, and a base URL.
Is maalls/pager suitable for paginating large database query results?
It can help calculate offsets and page windows, but it is described as a lightweight utility rather than a full query pagination layer. For large datasets, combine it with efficient LIMIT and OFFSET queries or cursor-based queries and avoid loading all rows into memory. Benchmark it against Laravel's paginator for your workload.
How should I test pagination logic that uses maalls/pager?
Write unit tests for edge cases such as the first page, last page, empty results, and out-of-range page numbers. Assert that the computed offsets, total pages, and result windows match expectations. If you render links, use HTTP or view tests to confirm the generated navigation URLs.
What alternatives exist to maalls/pager for Laravel pagination?
Laravel's built-in paginator is the default choice for Eloquent and query builder results. Doctrine's Paginator is relevant for Doctrine-based projects, and custom offset calculations are common for logs or raw arrays. maalls/pager is positioned as a lightweight option when you do not need a heavier dependency.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource