Welcome Guest, Not a member yet? Register   Sign In
Why is it not recommended to use services in models and libraries?
#2

No one forbids you, this is a recommendation.
CI4 is already a little behind modern methods (for example, DI containers, etc.). I think that's why having dependencies in Models is better than a direct call. This is especially important when writing tests with fake Services
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply


Messages In This Thread
RE: Why is it not recommended to use services in models and libraries? - by ozornick - 11-04-2023, 05:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB