\Illuminate\Foundation\Bootstrap\BootProviders::class 做的事情比较简单, 执行boot之前之后的两个回调函数, 以及调用eager provider 的boot function
源码
// Illuminate\Foundation\Bootstrap\BootProvidersclassBootProviders{/**
* Bootstrap the given application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/publicfunctionbootstrap(Application $app){$app->boot();}}// Illuminate\Foundation\Application /**
* Boot the application's service providers.
*
* @return void
*/publicfunctionboot(){if($this->booted){return;}// Once the application has booted we will also fire some "booted" callbacks// for any listeners that need to do work after this initial booting gets// finished. This is useful when ordering the boot-up processes we run.$this->fireAppCallbacks($this->bootingCallbacks);array_walk($this->serviceProviders,function($p){$this->bootProvider($p);});$this->booted=true;$this->fireAppCallbacks($this->bootedCallbacks);}/**
* Boot the given service provider.
*
* @param \Illuminate\Support\ServiceProvider $provider
* @return mixed
*/protectedfunctionbootProvider(ServiceProvider $provider){if(method_exists($provider,'boot')){return$this->call([$provider,'boot']);}}