Hi I am new to Laravel and I am try to grasp the concept of creating and using service providers and contracts in my development. I was reading this article
How to Create a Service Provider in Laravel 5.1
It talked about how they are both created and used but I still have a hard time grasping the idea of it.
The article mention this hopefully someone can discuss this more indepth
So why bother making a contract? Well, one of the amazing features in Laravel is that you can type hint the contract, and the service provider will retu an instance of whatever concrete class you have bound to it.
They also mention this
Ok, now we need to create the service provider, which will bind the contract and the concrete class.
What is this binding? how does it work from top to bottom? Whats the point of doing a bind?
Is dependency injection only for services?
