How does Laravel handle dependency injection?

How does Laravel handle dependency injection?

a) Using the service container
b) Using Blade templating
c) Using middleware
d) Using controllers

Answer:

a) Using the service container

Explanation:

Laravel uses the service container to manage class dependencies, allowing developers to inject objects and services into classes.

Reference:

Laravel Quiz – MCQ – Multiple Choice Questions

Scroll to Top