Too Long; Didn't Read
A 30 line script can finally provide a good solution for a repository pattern in Laravel apps. The problem is that you can’t use Eloquent functions on your repositories. A repository with the use of the Repository trait would look like this: $model-repositories-repository-referreditories. The solution was created by creating a simple piece of code which enables all the features of Elquent on your repository. This way you can use the repository pattern as a way to keep your models and your repositories clean!