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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle