Welcome Guest, Not a member yet? Register   Sign In
Dependency Management in Custom Services
#1

Hello
If I create a custom service, is it considered good practice to load models and other libraries/services directly within the service itself?Or is it better to pass all these instances from the controller when calling the service?

For example, if I have a service that requires 6 models and 3 other services or libraries, should I pass them all through the constructor?
Thank you [Image: smile.png]
Reply


Messages In This Thread
Dependency Management in Custom Services - by campio97 - 03-21-2025, 07:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB