DEV Community

Discussion on: Implement CRUD with Laravel Service-Repository Pattern

Collapse
 
ostap profile image
Ostap Brehin • Edited

Why create these complications? (additional layers on top of simple Eloquent CRUD)

I don't think it's good practice in that case.

adelf.tech/2019/useless-eloquent-r...

Collapse
 
safventure11000 profile image
Safventure11000 • Edited

Hi,

Thanks for dropping by.

Based on my experience, Laravel service-repository pattern is conducive if you're working in a big team or big projects. It is also sustainable and easy to understand to separate the logic and the wrapper of the model. The concept of repositories and services ensures that you write reusable code and helps to keep your controller as simple as possible making them more readable.

Some comments have been hidden by the post's author - find out more