06.10.2016 Views

laravel-5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Service Container<br />

• Introduction<br />

• Binding A> - Binding Interfaces To Implementations A> - Contextual Binding A> - Tagging<br />

• Resolving<br />

• Container Events<br />

Introduction<br />

The Laravel service container is a powerful tool for managing class dependencies and performing<br />

dependency injection. Dependency injection is a fancy phrase that essentially means this: class<br />

dependencies are “injected” into the class via the constructor or, in some cases, “setter” methods.<br />

Let’s look at a simple example:<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!