Conditionally Loading Service Providers in Laravel 5
Published on by Eric L. Barnes
In this tutorial, Matt Stauffer shows you an easy way of conditionally loading service providers.
Since Laravel 5 flattened a lot of the environment-specific structures, much of the configuration that was once stored in different config directories for each environment has now moved into .env files.
But one that can’t just live in .env is the environment-dependent loading of service providers.
Eric is the creator of Laravel News and has been covering Laravel since 2012.