Wrote a Blog Post
Laravel's service container is one of the most important pieces of the framework yet it gets so little attention from a lot of developers. Being interviewed a large number of candidates, I've realized that there are two main reasons behind this ignorance.

  • They find the idea of dependency injection hard to understand. Let alone the idea of IoC and IoC container.
  • They don't understand if they're ever going to use the container or not.
So in this article, I'll take you through step by step in understanding this magical concept. I'll begin with the fundamental concepts and finally, by the end, you should get an idea of how the different pieces fit together.

Laravel Service Container and Service Providers Explained