What does the make() method do in Laravel?

Laravel’s make method is used to create an instance of a class or interface.While creating an instance with make method Laravel will automatically inject all dependencies of class that is defined in it’s constructor. E.g. an instance of the Mailer class would be automatically injected in below code. namespace AppServices;use IlluminateMailMailer;class MyService{ public function __construct(Mailer […]

Read More

Laravel service container

Explain Laravel service container ?One of the most powerful feature of Laravel is its Service Container It is a powerful tool for resolving  class dependencies and performing dependency injection  in Laravel . Dependency injection is a fancy phrase that essentially means  class dependencies are “injected” into the class via the constructor or, in some cases, […]

Read More