I think you should start with Repository pattern:
these are the first results from google.
If you would be kind enough to buy Jeffry Way a lunch, try Laracast.
So in basic terms, repositories can act almost like include files (in addition to serving other purposes).
Is that accurate?
jerauf said:
So in basic terms, repositories can act almost like include files (in addition to serving other purposes).
Is that accurate?
Nope. Repository pattern is designed to solve exact problem and should be used to:
The repository mediates between the data source layer and the business layers of the application. It queries the data source for the data, maps the data from the data source to a business entity, and persists changes in the business entity to the data source. A repository separates the business logic from the interactions with the underlying data source or Web service.
There are other good practice for repeated code but it all depends on that code purpose.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community