r/PHPhelp • • May 30 '18

PHP Dependency Injection tutorials?

I need a tutorial on using Dependency Injection/IOC in PHP. We are going to build an API and want the output formatters to be "pluggable" meaning we may use DI to accomplish this. I don't know how to do DI in PHP and need some brushing up on it.

9 Upvotes

6 comments sorted by

View all comments

0

u/devhourstudio May 30 '18

Laracasts have some good tutorials. https://laracasts.com/series/php-for-beginners/episodes/22

https://laracasts.com/series/solid-principles-in-php/episodes/5

https://laracasts.com/lessons/dependency-injection-containers

I think you are mainly referring to dependency inversion. Are you planning on using a framework like Laravel?