GitHub repository: Hossam-PHP/Repository-design-pattern-in-Laravel
Primary language: PHP
Created: 2019-09-01T13:40:42Z
Description: The repository design pattern allows you to use objects without having to know how these objects are persisted. Essentially it is an abstraction of the data layer. This means that your business logic doesn’t need to know how data is retrieved or what the source of the data is. The business logic relies on the repository to retrieve the correct data. A misconception that I see a lot regarding to this pattern is that repositories are being implemented in such a way to create or update records. This is not what a repository should do. Repositories shouldn’t create or update data, but should only be used to retrieve data.