Laravel service provider examples
On his blog Barry van Veen listed some examples of things you can do within a Laravel service provider.
Currently, I’m working on my first Laravel package. So, it was time to dive into the wonderful world of the service container and service providers.
Laravel has some great docs about, but I wanted to see some real-world examples for myself. And what better way than to have a look at the packages that you already depend on?
This post details the different things that a service provider can be used for, each taken from a real open-source project. I’ve linked to the source of each example.