console command

routes/console.php

copy一个默认的

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

这时候命令行就可以这么用了 用于处理简单逻辑

传参:

参数添加描述

原文地址:https://www.cnblogs.com/webskill/p/7469152.html