Skip to main content

One doc tagged with "repository"

View all tags

The Repository Pattern — The Boundary Between Domain and Persistence

Implements the repository pattern with Laravel + Eloquent. Covers why the interface lives in the domain layer (DIP / testability), one aggregate = one repository, mapping between entities and Eloquent Models, the N+1 problem and eager loading, mass-assignment protection, and registration in the DI container.