我想用一系列简单的点来显示处理进度.这在浏览器中很容易,只需执行echo '.'
,它就在同一行上,但在向artisan命令行发送数据时,如何在同一行上执行此操作?
Each subsequent call to $this->info('.')
puts the dot on a new line.
我想用一系列简单的点来显示处理进度.这在浏览器中很容易,只需执行echo '.'
,它就在同一行上,但在向artisan命令行发送数据时,如何在同一行上执行此操作?
Each subsequent call to $this->info('.')
puts the dot on a new line.
The method info uses writeln, it adds a newline at the end, you need to use write instead.
//in your command
$this->output->write('my inline message', false);
$this->output->write('my inline message continues', false);