I need to create a command and a controller function that both execute the same code and I'm reading that the best way to do it is to create service provider and then call that from both the command and the controller.
Problem is I can't clearly figure out what exactly a service provider does and what bindings are used for. Perhaps someone can explain to me how service providers and bindings are used briefly to give me an idea on how I can accomplish this.