Ritu Singh
Solution
The best part about Laravel is that it automatically resolves the Service that you want it to perform. The following code is the best example of this:
The app() helper resolves that class if you pass in a FQCN as a parameter, but it returns an instance of Laravel Container otherwise:
If you want to bind a service class to an interface let's say:
Binding the House interface to the ServiceProvider enables the Container to infer that you want to inject the AncientHouse class, even if you don't want to use the exact AncientHouse class.
Within the AppServiceProvider's register() method
Suggested blogs:
>Step by Step guide to Deploy Terraform in Azure using GitHub Actions
>Testing react components using Hooks and Mocks
>Use Firebase Realtime Database with ASP.NET MVC App
>Use of Singletons in .NET Core in AWS Lambda
>What are common syntax errors and exceptions in Python
>What is data binding in Angular?