Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deviationist/7a24fc88d53bcc3102ff6f63b8df319a to your computer and use it in GitHub Desktop.
Save deviationist/7a24fc88d53bcc3102ff6f63b8df319a to your computer and use it in GitHub Desktop.
How to use Symfony's ProgressIndicator-class in a Laravel Console command.
$indicator = new \Symfony\Component\Console\Helper\ProgressIndicator($this->output);
$indicator->start('Starting the process...');
foreach (range(0, 10) as $i) {
usleep(5 * 10000);
$indicator->advance();
}
$indicator->finish('Process complete!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment