Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sineld/ac7bad83e10ccf8831281cae9cc804cd to your computer and use it in GitHub Desktop.
Save sineld/ac7bad83e10ccf8831281cae9cc804cd to your computer and use it in GitHub Desktop.
Artisan Command Progressbar
<?php
$progressBar = $this->output->createProgressBar(count($users));
$progressBar->setEmptyBarCharacter(' ');
$progressBar->setProgressCharacter('>');
$progressBar->setBarCharacter('-');
$progressBar->start();
foreach ($users as $user) {
$this->performTask($user);
$progressBar->advance();
}
$progressBar->finish();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment