use Illuminate\Console\Command;
use Nikolaynesov\CommandStreaming\Traits\StreamsCommandOutput;
class MyCommand extends Command
{
use StreamsCommandOutput;
protected $signature = 'my:command';
public function handle(): int
{
$this->startStreaming();
$this->info('This output will be streamed!');
$this->line('Processing...');
$this->error('Any errors are captured too');
$this->stopStreaming();
return 0;
}
}