Weave Code
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

Doctrine Utils Laravel Package

ecommit/doctrine-utils

Small set of Doctrine ORM QueryBuilder utilities: accurate COUNT helpers, a paginator, and filter helper methods. Install via Composer and use to simplify common query building patterns in your PHP projects.

View on GitHub
Deep Wiki
Context7

QueryBuilder - Count

Create a paginator.

With DBAL QueryBuilder

use Ecommit\DoctrineUtils\Paginator\DoctrineDBALPaginator;

$paginator = new DoctrineDBALPaginator([
    'query_builder' => $queryBuilder,
    //Options - See below
]);

Returns : Ecommit\DoctrineUtils\Paginator\DoctrineDBALPaginator object

Available options :

Option Type Required Default value Description
query_builder Doctrine\DBAL\Query\QueryBuilder Yes QueryBuilder
page Integer No 1 Current page
max_per_page Integer No 100 Max elements per page
count Integer or array No [ ] If integer : Manual value of the number of results foundIf array: Count options
by_identifier String or null No null If not null, perform a query with DISTINCT (with this identifier value) to find all ids of the rows in from on the current page. And Perform a WHERE IN query to get all results for the current page.

Available methods : See API documentation

With ORM QueryBuilder

use Ecommit\DoctrineUtils\Paginator\DoctrineORMPaginator;

$paginator = new DoctrineORMPaginator([
    'query_builder' => $queryBuilder,
    //Options - See below
]);

Returns : Ecommit\DoctrineUtils\Paginator\DoctrineORMPaginator object

Available options :

Option Type Required Default value Description
query_builder Doctrine\ORM\QueryBuilder Yes QueryBuilder
page Integer No 1 Current page
max_per_page Integer No 100 Max elements per page
count Integer or array No [ ] If integer : Manual value of the number of results foundIf array: Count options
by_identifier String or null No null If not null, perform a query with DISTINCT (with this identifier value) to find all ids of the rows in from on the current page. And Perform a WHERE IN query to get all results for the current page.
simplified_request Bool or null No true if by_identifier option is nullnull if by_identifier option is not null Remove unnecessary instructions. Used Only if by_identifier option is null
fetch_join_collection Bool or null No false if by_identifier option is nullnull if by_identifier option is not null See Doctrine documentation. Used Only if by_identifier option is null

Available methods : See API documentation

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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor