Understanding repository pattern in Laravel
Laravel Interview Questions has a good tutorial on how to use repository pattern in Laravel 5.
The repository mediates in between the business layer and data source layer. It persist the change in the object or entity of business logic to data source layer so that the client gets the similar data. Repository request the data from data source, and provide that data to client business logic. It also seperates the data source from the client business logic. It provides a substitution point for unit test. It centralize the data logic so that data can be find easily. It provides the architecture which can ne used in any of web applications.
Link:
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5 Laravel 5.2 Laravel 5.1 Laravel 5.3 Laravel 5.4 Laravel 5.5 Intermediate