There is probably a bit of a theme since you only want a series of dots. But you can easily imagine the progress bar in the wizard commands using the built-in functions in Laravel.
Declare a class variable as follows:
protected $progressbar;
And initialize the progress bar like this, say in the fire () method:
$this->progressbar = $this->getHelperSet()->get('progress'); $this->progressbar->start($this->output, Model::count());
And then do something like this:
foreach (Model::all() as $instance) { $this->progressbar->advance();
And complete the progress by doing this:
$this->progressbar->finish();
Update: for Laravel 5.1 + A simpler syntax is even more convenient:
- Initialize
$bar = $this->output->createProgressBar(count($foo)); - Advance
$bar->advance(); - Finish
$bar->finish();
source share