Service Providers

Bootstrap and register application services

Service providers bootstrap your application: register bindings, configure services, and wire up events.

Service providers are the central place to configure your application. All core Laravel services are bootstrapped via providers.

Load providers
Read config/app.php
register()
Bind services to container
boot()
Configure services, wire events
App ready
Handle incoming request
PHP
'providers' => [
    Illuminate\Auth\AuthServiceProvider::class,
    Illuminate\Cache\CacheServiceProvider::class,
    Illuminate\Database\DatabaseServiceProvider::class,
    App\Providers\AppServiceProvider::class,
]