console command

routes/console.phpphp

copy一個默認的this

Artisan::command('hello', function () {
    $this->comment('hello world');
})->describe('Display an inspiring quote');

這時候命令行就能夠這麼用了 用於處理簡單邏輯命令行

傳參:
code

參數添加描述blog

相關文章
相關標籤/搜索