拉莫斯之舞
所有配置方法(get、set、has..)都位于Illuminate\Config\Repository并且此类实现了Illuminate\Contracts\Config\Repository接口。这个类和接口位于Illuminate\Foundation\Application应用程序的容器中,请检查registerCoreContainerAliases。注册后,框架需要初始化/加载配置并Illuminate\Foundation\Bootstrap\LoadConfiguration负责此。请检查bootstrap和loadConfigurationFiles 方法负责注册的类用于Illuminate\Foundation\Http\Kernel.此类用于Illuminate\Foundation\Http\Kernel,这里是引导程序列表。// list of framework related bootstrappers to make application ready when application is upprotected $bootstrappers = [ \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class, \Illuminate\Foundation\Bootstrap\LoadConfiguration::class, \Illuminate\Foundation\Bootstrap\HandleExceptions::class, \Illuminate\Foundation\Bootstrap\RegisterFacades::class, \Illuminate\Foundation\Bootstrap\RegisterProviders::class, \Illuminate\Foundation\Bootstrap\BootProviders::class,];Config facade 只是你和容器之间的静态代理。配置助手只是使用服务定位器config从绑定服务中获取实例。