Skip to content

Instantly share code, notes, and snippets.

@tobikris
Created June 25, 2015 17:25
Show Gist options
  • Save tobikris/2d709777024b7bc40370 to your computer and use it in GitHub Desktop.
Save tobikris/2d709777024b7bc40370 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