Should I use a package for reusing the code when implementing repositories or should I write all the code from the scratch.
I mean repository methods that usually are listed in AbstractRepository
.
This package anlutro/laravel-repository has descent amount of methods in its abstract classes, but lacks an interface
to be extended in my RepositoryInterface
s
This one ipunkt/laravel-repositories has an interface
to be extended from but has a lower number of methods and reputation.
What do you usually do?
I wrote mine from scratch just for the learning curve, repositories and interfaces inside my application namespace. Interfaces are not needed they are just good for future proofing if you wish to swop out for another ORM but I agree, the abstract interface should exist. Could you not contribute an interface to the solution you prefer?
Thanks, what do you think about the usefulness of this package anlutro/laravel-repository
I'm new to repositories, and can`t judge it completely.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community