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.
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...
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.
I agree with you that the Laravel service-repository pattern is recommended for large teams or big projects.