blog-contest-may-mayhem
blog-contest-may-mayhem copied to clipboard
How to implement repository pattern in Laravel
https://medium.com/@alviahmed/how-to-implement-repository-pattern-in-laravel-d599904d1f61
Imagine you have created a controller that does no logic and just redirects to some other controller? This is essentially the same as what you did with this "repository" class.
@crnkovic repository classes usually are meant for respective single model. It's unlikely that you will have to work on a single model in a controller all the time as a model often has many dependencies through relationships