Base understanding of Repositories in Laravel, how they are beneficial, and how to create an Abstract Repository for powerful functionality out of the box
we took it a step further and created an abstract class that all repositories inherit. This way they get tons of functionality right out of the box. Abstract Repository Methods: • function all(); • function paginate(); • function create(); • function update(); • function delete(); • function find(); • function findBy();
in the update method? You could create a method within the controller to do this, but then it is only accessible from the HTTP layer which isn’t very reusable.