Challenge: you need a flexible (swap in other repository implementations) way to display some kind of resource. Let's say, Posts. What does your folder structure look like?
Requirements:
- Repository implements an interface
- Must show at least one implementation of the interface (Eloquent version is fine)
- The interface is injected into your PostsController.
- Show where you register your IoC bindings
- Show folder structure. Where are interfaces/repositories stored?
@fideloper I said abstract :)
I was thinking more that you would have an interface with your contract and an abstract that would have common methods and implementations per repository. Not as a way to implement a contract just as a way to keep things DRY