如何在插件中使用自定義命令?
protected static $pathRelation = array (
'command' => 'app/command'
);
在插件Install中 將命令復制到app/command中即可 簡單快捷
可以改下 /webman
文件
新增
foreach (config('plugin', []) as $firm => $projects) {
foreach ($projects as $name => $project) {
foreach ($project['command'] ?? [] as $command) {
$cli->add(new $command);
}
}
}
插件新增個配置文件 command.php
return [
\Foo\Admin\Command\CustomCommand::class,
];
提了個 pull request 給 webman/console