verclam/doctrine-filter-paginator
A Laravel package that brings filtering and pagination to Doctrine queries. Build dynamic filters from request parameters, chain conditions onto query builders, and paginate results through a clean, reusable API for Doctrine-backed applications.
Install via Composer: composer require verclam/doctrine-filter-paginator. Since this is the initial v0.0.1 release, start by reading the package's README and source (especially the service provider and paginator class) to understand the exposed API. The first use case is paginating Doctrine query results while preserving active Doctrine filters (e.g., soft‑delete, tenant, or custom SQL filters). Look for a paginator service or trait that wraps Doctrine's Paginator and applies registered filters. A minimal example likely involves injecting the paginator into a controller, passing a QueryBuilder, and rendering results with Laravel's pagination views.
paginate() method on a Doctrine QueryBuilder. Combine with Laravel's request parameters (page, perPage) for standard pagination.SoftDeleteFilter) in your Doctrine configuration, then use the package's paginator so filters are automatically applied before counting and fetching results. This avoids manually enabling filters per query.SQLFilter and register it; the paginator should respect the filter's parameters when building the count and limit queries.LengthAwarePaginator or a Doctrine‑backed paginator instance).laravel-doctrine/orm; ensure the Doctrine EntityManager is available. For API responses, convert the paginator result to a resource collection. If the package provides a Blade directive or JSON structure, leverage it to reduce boilerplate.EntityManager or per query. Verify that the paginator enables filters at the right time—especially for count queries, which may bypass filters if not handled.$query->setMaxResults() and setFirstResult() carefully when the paginator also manipulates them.config/doctrine.php → sql_logger) to inspect the generated count and select queries. Check that filter parameters are bound correctly.php artisan vendor:publish) and review defaults. Watch for conflicts with Laravel's own pagination config.How can I help you explore Laravel packages today?