1. 使用{laravel dir}/bootstrap/app.php
2. 在app.php中會去建立一個Illuminate\Foundation\Application的物件
3. 該Application
a. 繼承Container(Illuminate\Container\Container)
b. 實作 ApplicationContract(Illuminate\Contracts\Foundation\Application)
c. 實作HttpKernelInterface(Symfony\Component\HttpKernel\HttpKernelInterface)
4. app.php中,會再去建立三個singleton(在Container singleton的method)的物件, artisan用到的則 是console Kernel的部份
a. Illuminate\Contracts\Http\Kernel
b. Illuminate\Contracts\Console\Kernel
c. Illuminate\Contracts\Debug\ExceptionHandler
5. {laravel dir}/artisan 去取得Console Kernel的singleton物件
a. 執行app的handle method() (Illuminate\Foundation\Console\Kernel)
b. handle內會去new Illuminate\Console\Application(artisan主要程式
繼承Illuminate\Console\Application)
c. 執行 Illuminate\Console\Application 內的method run();
d. run() 內會再執行Illuminate\Console\Application doRun 並回傳結果