happyr/doctrine-specification
Reusable Doctrine query Specifications for PHP. Replace messy repositories and huge QueryBuilder methods with small, composable, testable spec classes. Reduce duplication, avoid methods with many arguments, and extend queries cleanly as your app grows.
Replacing Doctrine's default repository type with Happyr\DoctrineSpecification\Repository\EntitySpecificationRepository
is easy in Laravel. The Doctrine bundle provides a place in configuration to specify the new type.
// doctrine.php
use Happyr\DoctrineSpecification\Repository\EntitySpecificationRepository;
return [
'managers' => [
'default' => [
'repository' => EntitySpecificationRepository::class,
],
],
];
How can I help you explore Laravel packages today?