Say I have ~20 models, so ~20 repositories, then I want to have interfaces as well so I have about 20 App::bind();
in my routes.php file so I decided to use service providers. Is it kosher to have service provider for every repository?
What is the benefit in a first place?
Why not just create file like "app/bindings.php" (along with observers.php, where are all the listeners stored) and fill them up with ~20 App::bind();
lines?
I did it the second way (one service provider file with multiple bindings) and I am happy with it so far. I'd like to hear opinions on this as well.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community