A Laravel package that implements the Repository pattern to abstract the database layer, making applications more flexible and maintainable.
Laravel 5 Repositories is a Laravel package that implements the Repository design pattern to abstract and centralize data access logic. It provides a structured way to interact with your database, decoupling your business logic from Eloquent models and making your application more testable and maintainable.
Laravel developers building medium to large applications who need a clean separation between data access and business logic, especially teams focusing on maintainability and test-driven development.
It offers a complete, battle-tested implementation of the Repository pattern with additional features like criteria, caching, and presenters out of the box, reducing boilerplate and enforcing consistent data access patterns across Laravel projects.
Laravel 5 - Repositories to abstract the database layer
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a complete Repository pattern implementation with base classes and interfaces, decoupling business logic from Eloquent models for improved testability and maintenance, as shown in the detailed usage examples.
Criteria system allows creating reusable query conditions that can be applied across repositories, enhancing code organization and reducing duplication, with support for custom criteria like MyCriteria.
RequestCriteria automatically handles filtering, sorting, and pagination from HTTP request parameters, reducing controller boilerplate, as demonstrated with examples like search, filter, and orderBy queries.
Built-in caching support with configurable invalidation improves performance by caching query results, and cleanup rules can be set on create, update, or delete operations.
Artisan generators like make:entity and make:repository quickly create repositories, criteria, presenters, and more, speeding up initial setup and enforcing consistent patterns.
Migration guides for versions 2.0 and 2.1 indicate potential breaking changes that can require significant refactoring in existing projects, adding maintenance overhead.
Full functionality relies on additional packages like league/fractal for presenters and prettus/laravel-validator for validation, increasing project complexity and potential version conflicts.
Detailed setup for generators, cache, and searchable fields in config/repository.php adds initial learning time and can be overwhelming for simple use cases.