DEV Community

Discussion on: Getting Started with Repository Pattern in Laravel using Inheritance and Dependency Injection

Collapse
 
chooudry profile image
idham choudry • Edited

What do you think if we add another service layer between the controller and the repository, so the pattern becomes UserController -> UserService -> UserRepository ? where should we put more logic, for example if we want to fetch the data from the model by joining it with another table ?

Collapse
 
farahhammam profile image
farah fouad

I want to do the same, so is there any resource I could take a look at it?