In laravel, every services are separated into separate composer packages. It is kept in such a way that, we can even use them separately in our own php projects.
Just like laravel using symfony components.
Check out this tutorial. It explains how to use eloquent ORM of laravel outside in your little vanilla PHP environment.
But more importantly, it gave us one capability. It is to leave out service providers that we do not need at all.
- PasswordResetServiceProvider – Not needed if you are not providing password reset services.
- BroadcastServiceProvider – Not every app needs broadcasting services.
- ConsoleSupportServiceProvider – It is not used much in production environment.
- MailServiceProvider – Include this, only if you are sending out mails to your users.
- NotificationServiceProvider – Same as mail, this is not necessary if you are not dispatching any notifications.
- QueueServiceProvider – Queue is only necessary if there are time consuming tasks to be managed. If not, why include it at all.
- RedisServiceProvider – If you are not using redis services, why include at all.
- ViewServiceProvider – If you are into API, this service provider is not necessary at all.
Do not forget to comment out the respective facades too.
Everything is awesome.