If you’re discussing object oriented programming in PHP these days, it’s likely that you’ve at least heard about such topics as dependency injection or IoC containers. They’re both pretty useful tools for coding and testing your code. What exactly is an IoC container though? It sounds pretty complicated but it’s really not. If you read my earlier post on using repositories in Laravel you might have noticed that when using dependency injection in our __construct method, we didn’t have to actually instantiate our repository.…
Read more »The past couple of days I have been cramming my brain with coding knowledge. I’m working on a side project that I’ll likely announce in detail as it gets closer to launch. Since I’m starting from an empty Laravel project and building it from the ground up, I’m learning quite a bit about the framework and even some of the new features in PHP 5.4 and above. One technique I’m starting to better understand is that of dependency injection.…
Read more »